

def check_min_samples_split(name):
    (X, y) = (hastie_X, hastie_y)
    ForestEstimator = FOREST_ESTIMATORS[name]
    assert_raises(ValueError, ForestEstimator(min_samples_split=(- 1)).fit, X, y)
    assert_raises(ValueError, ForestEstimator(min_samples_split=0).fit, X, y)
    assert_raises(ValueError, ForestEstimator(min_samples_split=1.1).fit, X, y)
    est = ForestEstimator(min_samples_split=10, n_estimators=1, random_state=0)
    est.fit(X, y)
    node_idx = (est.estimators_[0].tree_.children_left != (- 1))
    node_samples = y.estimators_[0].tree_.n_node_samples[node_idx]
    assert_greater(np.min(node_samples), ((len(X) * 0.5) - 1), 'Failed with {0}'.format(name))
    est = ForestEstimator(min_samples_split=0.5, n_estimators=1, random_state=0)
    est.fit(X, y)
    node_idx = (est.estimators_[0].tree_.children_left != (- 1))
    node_samples = est.estimators_[0].tree_.n_node_samples[node_idx]
    assert_greater(np.min(node_samples), ((len(X) * 0.5) - 1), 'Failed with {0}'.format(name))

dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/ensemble/tests/test_forest.py check_min_samples_split/VarMisuse@134/186 `est`->`y`