def check_classification_toy(name):
    ForestClassifier = FOREST_CLASSIFIERS[name]

    clf = ForestClassifier(n_estimators=10, random_state=1)
    clf.fit(X, y)
    assert_array_equal(clf.predict(T), true_result)
    assert_equal(10, len(clf))

    clf = ForestClassifier(n_estimators=10, max_features=1, random_state=1)
    clf.fit(X, y)
    assert_array_equal(clf.predict(T), true_result)
    assert_equal(10, len(clf))

    # also test apply
    leaf_indices = clf.apply(X)
    assert_equal(leaf_indices.shape, (len(X), clf.n_estimators))
Set an option, overwriting the existing value.
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/ensemble/tests/test_forest.py/check_classification_toy--crossover with--dataset/ETHPy150Open joonty/vdebug/plugin/python/start_vdebug.py/DebuggerInterface.handle_opt