5039cf803debf7a859f71f882fa5af46fc18bb5a,tests/test_pca.py,,test_pca_validation,#,356

Before Change


    X = np.array([[0, 1, 0], [1, 0, 0]])
    X = da.from_array(X, chunks=(2, 3))
    smallest_d = 2  // The smallest dimension
    lower_limit = {"randomized": 1, "full": 0, "auto": 0}

    for solver in solver_list:
        // We conduct the same test on X.T so that it is invariant to axis.
        // But dask-ml needs tall and skinny

After Change


            for n_components in [-1, 3]:

                with pytest.raises(ValueError, match="n_components"):
                    dd.PCA(n_components, svd_solver=solver).fit(data)

            if solver == "arpack":

                n_components = smallest_d
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: dask/dask-ml
Commit Name: 5039cf803debf7a859f71f882fa5af46fc18bb5a
Time: 2019-10-30
Author: TomAugspurger@users.noreply.github.com
File Name: tests/test_pca.py
Class Name:
Method Name: test_pca_validation


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 1aff940e60d7d62bd82ddf7469e666197832e212
Time: 2017-05-11
Author: valentina.zantedeschi@ibm.com
File Name: src/classifiers/cnn_unittest.py
Class Name: TestCNNModel
Method Name: test_mnist


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 1aff940e60d7d62bd82ddf7469e666197832e212
Time: 2017-05-11
Author: valentina.zantedeschi@ibm.com
File Name: src/classifiers/cnn_unittest.py
Class Name: TestCNNModel
Method Name: test_cifar