Skip to content

Kaggle n_estimators issue with DecisionTreeClassifier #116

@MarcinKamil84

Description

@MarcinKamil84

Here's my code snippet from Kaggle notebook:

rf_cl = RandomForestClassifier()
dt_cl = DecisionTreeClassifier()

estimator = dt_cl

feat_selector = BorutaPy(
    verbose=2,
    estimator=estimator,
    n_estimators='auto',
    max_iter=20
)

feat_selector.fit(np.array(train_set_final), np.array(train_set_labels))

Here's the error:

ValueError: Invalid parameter 'n_estimators' for estimator DecisionTreeClassifier(). Valid parameters are: ['ccp_alpha', 'class_weight', 'criterion', 'max_depth', 'max_features', 'max_leaf_nodes', 'min_impurity_decrease', 'min_samples_leaf', 'min_samples_split', 'min_weight_fraction_leaf', 'random_state', 'splitter'].

With RandomForestClassifier all works fine.
What can be the issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions