Skip to content

Duplicate features in selected subset #2

Description

@dunnkers

When the algorithm has stopped using the ‘feature selected twice’ stopping condition, the selected subset seems to still include the lastly selected feature, i.e. a duplicate feature. See the log output below.

Image

You can see that the selected subset contains feature no. 19, 18 and, again, 19.

→ Presumably the last-added feature should be removed when the stopping condition is triggered, like is done in the other stopping conditions:

FeatBoost/feat_boost.py

Lines 335 to 337 in 0bfd11a

self.selected_subset_ = self._all_selected_variables[:-1]
self.complete_subset_ = self._all_selected_variables[:-1]
self.accuracy_ = self.accuracy_[:-1]

Like in #1, I execute FeatBoost using same setup as test.py:

    # Setup estimator
    xgboost_ensemble = XGBClassifier(max_depth=3, learning_rate=0.1,\
        n_estimators=200, silent=True, objective='binary:logistic',\
        booster='gbtree', n_jobs=1, nthread=None, gamma=0, min_child_weight=1,\
        max_delta_step=0, subsample=1, colsample_bytree=1, colsample_bylevel=1,\
        reg_alpha=0, reg_lambda=1, scale_pos_weight=1, base_score=0.5,\
        random_state=0, seed=None, missing=None)
    # Setup FS method
    fs = FeatBoostClassification(estimator=[xgboost_ensemble,\
        xgboost_ensemble, xgboost_ensemble], number_of_folds = 10,\
            siso_ranking_size = 8,\
            max_number_of_features = 100,\
            siso_order=4,\
            epsilon=1e-18,\
            verbose=2)

    # Run Feature Selection
    fs.fit(X, y)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions