242981f4577e5d90dbd6d3925d92eb5cb725e17a,tests/test_metrics.py,,test_accuracy,#,43

Before Change


    Testing accuracy.
    n_samples, n_features, n_classes = 1000, 100, 2

    beta0 = np.random.normal(0.0, 1.0, 1)
    beta = np.random.normal(0.0, 1.0, (n_features, n_classes))

    // sample train and test data
    glm_sim = GLM(distr="binomial", score_metric="accuracy")

After Change


    // sample train and test data
    glm_sim = GLM(distr="binomial", score_metric="accuracy")
    X = np.random.randn(n_samples, n_features)
    y = np.zeros((n_samples, 2))
    for idx, beta in enumerate(betas.T):
        y[:, idx] = simulate_glm(glm_sim.distr, beta0, beta, X)
    y = np.argmax(y, axis=1)
    glm_sim.fit(X, y)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 2

Instances


Project Name: glm-tools/pyglmnet
Commit Name: 242981f4577e5d90dbd6d3925d92eb5cb725e17a
Time: 2019-10-19
Author: mainakjas@gmail.com
File Name: tests/test_metrics.py
Class Name:
Method Name: test_accuracy


Project Name: ray-project/ray
Commit Name: 428516056abe41f135133e732a8d44af6ce9a234
Time: 2020-04-15
Author: sven@anyscale.io
File Name: rllib/utils/exploration/ornstein_uhlenbeck_noise.py
Class Name: OrnsteinUhlenbeckNoise
Method Name: _get_torch_exploration_action


Project Name: drckf/paysage
Commit Name: 8a19a6a7e9aa1c5711ad9632230bbddda5f24f40
Time: 2017-02-14
Author: charlesfisher@Charless-MacBook-Pro.local
File Name: paysage/models/initialize/init_hidden.py
Class Name:
Method Name: hinton


Project Name: fizyr/keras-retinanet
Commit Name: c0fba4acc339b619f1aca8b5b09b9170db32e4bf
Time: 2017-08-22
Author: j.c.gaiser@delftrobotics.com
File Name: keras_retinanet/models/resnet.py
Class Name:
Method Name: classification_subnet


Project Name: drckf/paysage
Commit Name: 4f3db9d97a6ff0f311d1811c9111354252ba0516
Time: 2017-02-14
Author: charlesfisher@Charless-MacBook-Pro.local
File Name: paysage/models/initialize/init_visible.py
Class Name:
Method Name: hinton