488a0e81a89b360d77c6cd3e7948b8e667e87775,imblearn/utils/estimator_checks.py,,check_samplers_X_consistancy_sample,#Any#Any#,177

Before Change


    sampler.fit(X, y)
    X_different = np.random.random((40, 2))
    y_different = y = np.array([1] * 25 + [0] * 15)
    assert_raises_regex(RuntimeError, "X and y need to be same array earlier",
                        sampler.sample, X_different, y_different)


def check_samplers_fit(name, Sampler):
    sampler = Sampler()

After Change


    sampler.fit(X, y)
    X_different = np.random.random((40, 2))
    y_different = y = np.array([1] * 25 + [0] * 15)
    with raises(RuntimeError, match="X and y need to be same array earlier"):
        sampler.sample(X_different, y_different)


def check_samplers_fit(name, Sampler):
    sampler = Sampler()
    X = np.random.random((30, 2))
    y = np.array([1] * 20 + [0] * 10)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: scikit-learn-contrib/imbalanced-learn
Commit Name: 488a0e81a89b360d77c6cd3e7948b8e667e87775
Time: 2017-08-24
Author: mailsik@gmail.com
File Name: imblearn/utils/estimator_checks.py
Class Name:
Method Name: check_samplers_X_consistancy_sample


Project Name: scikit-learn-contrib/imbalanced-learn
Commit Name: 488a0e81a89b360d77c6cd3e7948b8e667e87775
Time: 2017-08-24
Author: mailsik@gmail.com
File Name: imblearn/utils/estimator_checks.py
Class Name:
Method Name: check_samplers_no_fit_error


Project Name: scikit-learn/scikit-learn
Commit Name: c3eb5eda0fe08d3c0341031a23211b89721ae3a8
Time: 2021-02-22
Author: h.almubarak@ieee.org
File Name: sklearn/neighbors/tests/test_kde.py
Class Name:
Method Name: test_kernel_density_sampling