Unofficial implementation of the unsupervised feature selection algorithm proposed by Ono in March 2020 [1].
- Just add the
fs_ono2020.py
to your directory. - Import
fs_ono2020.FeatureSelector
class.
See demo.ipynb
.
n_features
int
Number of features to be selected.
random_state
int (optional, default: None)
Specify integer if you want reproducible output.
logging
bool (optional, default: False)
Specify True if you want to see the progress of instance fitting.
loop_limit
positive int (optional, default: numpy.inf)
Specify positive integer if you want the optimization loop to end in the middle.
fit(X)
Fit the
FeatureSelector
instance with your numpy.ndarray datasetX
.
fit_transform(X)
Fit the
FeatureSelector
instance with your numpy.ndarray datasetX
, and return new datasetX_selected
with the selected features.
transform(X)
Return new dataset
X_selected
with the selected features.
reconstruct(X_selected)
Return the reconstructed dataset
X_reconstructed
from the transformed datasetX_selected
.
selected
The list of selected feature indices
deselected
The list of deselected feature indices
original_dim
The original dimension of the input vectors
In the abstruct of the paper:
"In this study, we consider an objective function defined as the reconstruction loss of a linear autoencoder, and this is formulated as a discrete optimization problem that selects the element that minimizes it. Also, we propose a method to solve this problem by sequentially replacing elements chosen so that the objective function becomes smaller."
[1] Nobutaka Ono, "機械学習における乗算を用いない次元削減(Dimension reduction without multiplication in machine learning)," IEICE Tech. Rep., vol.119, no.440, SIP2019-106, pp.21-26, March 2020. (in Japanese). URL: https://www.ieice.org/ken/paper/20200302U1Xv/eng/