163eb7df13667e21b0e02a2706e18d1f53eee610,skrebate/vlsrelief.py,VLSRelief,fit,#VLSRelief#,65

Before Change



            print("features_scores_iter:")
            print(features_scores_iter)
            print("headers_iter:")
            print(headers_iter)
            print("features_selected:")
            print(features_selected)

After Change


        features_selected = []

        for iteration in range(self.num_feature_subset):
            if iteration == 1:
                // grab the previous features_selected
                // grab new features so that there is no overlap
                features_selected_id = []
                prev_selection = np.sort(features_selected[0])
                index = 0
                for i in range(total_num_features):
                    if index >= num_features:
                        features_selected_id.append(i)
                    elif prev_selection[index] != i:
                        features_selected_id.append(i)
                    else:
                        index += 1
            else:
                features_selected_id = np.random.choice(
                    range(total_num_features), num_features, replace=False)
                self.X_train = self.X_mat[:, features_selected_id]

            //print("features selected:")
            //print(features_selected_id)

            core_fit = core.fit(self.X_train, self._y)

            features_scores_iter.append(core_fit.feature_importances_)
            features_selected.append(features_selected_id)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: EpistasisLab/scikit-rebate
Commit Name: 163eb7df13667e21b0e02a2706e18d1f53eee610
Time: 2020-01-29
Author: alexmxu99@gmail.com
File Name: skrebate/vlsrelief.py
Class Name: VLSRelief
Method Name: fit


Project Name: jonas-koehler/s2cnn
Commit Name: d750d66fb998a44316000908f213ae73c53de97f
Time: 2018-03-03
Author: geiger.mario@gmail.com
File Name: examples/shrec17/dataset.py
Class Name: CacheNPY
Method Name: __call__


Project Name: EpistasisLab/scikit-rebate
Commit Name: ece383696800b9b34854df27a65a3d1d74669952
Time: 2020-05-28
Author: alexmxu@alexs-mbp-3.attlocal.net
File Name: skrebate/vlsrelief.py
Class Name: VLSRelief
Method Name: fit