Unofficial implementation of the unsupervised feature selection algorithm proposed by Ono in March 2020 [1].
- Just add the
fs_ono2020.pyto your directory. - Import
fs_ono2020.FeatureSelectorclass.
See demo.ipynb.
n_featuresint
Number of features to be selected.
random_stateint (optional, default: None)
Specify integer if you want reproducible output.
loggingbool (optional, default: False)
Specify True if you want to see the progress of instance fitting.
loop_limitpositive int (optional, default: numpy.inf)
Specify positive integer if you want the optimization loop to end in the middle.
fit(X)Fit the
FeatureSelectorinstance with your numpy.ndarray datasetX.
fit_transform(X)Fit the
FeatureSelectorinstance with your numpy.ndarray datasetX, and return new datasetX_selectedwith the selected features.
transform(X)Return new dataset
X_selectedwith the selected features.
reconstruct(X_selected)Return the reconstructed dataset
X_reconstructedfrom the transformed datasetX_selected.
selectedThe list of selected feature indices
deselectedThe list of deselected feature indices
original_dimThe 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/