0ef66bff7843bc7f9c4ff956c90f3a5bf404d08a,examples/knn_example.py,,,#,7

Before Change


    y_test_pred = clf.predict(X_test)
    y_test_score = clf.decision_function(X_test)

    print("Precision@n on train data is",
          precision_n_scores(y_train, y_train_score))
    print("ROC on train data is", roc_auc_score(y_train, y_train_score))

    print("Precision@n on test data is",
          precision_n_scores(y_test, y_test_score))

After Change



    ax = fig.add_subplot(223)
    plt.scatter(X_train[:, 0], X_train[:, 1], c=y_train_pred)
    plt.title("Train prediction by kNN")
    legend_elements = [Line2D([0], [0], marker="o", color="w", label="normal",
                              markerfacecolor="0", markersize=8),
                       Line2D([0], [0], marker="o", color="w", label="outlier",
                              markerfacecolor="yellow", markersize=8)]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 10

Non-data size: 3

Instances


Project Name: yzhao062/pyod
Commit Name: 0ef66bff7843bc7f9c4ff956c90f3a5bf404d08a
Time: 2018-05-19
Author: yuezhao@cs.toronto.edu
File Name: examples/knn_example.py
Class Name:
Method Name:


Project Name: PIQuIL/QuCumber
Commit Name: f0a81e2d218aa41b538de5e5cfebcc149f758dc5
Time: 2018-07-20
Author: gtorlai@uwaterloo.ca
File Name: examples/rbm_tutorial.py
Class Name: BinomialRBM
Method Name: fit


Project Name: deepchem/deepchem
Commit Name: 2350e18231a67fa9d795fe7a16919b344a4b4ce5
Time: 2017-02-05
Author: bharath.ramsundar@gmail.com
File Name: examples/factors/FACTORS_correlations.py
Class Name:
Method Name:


Project Name: geekcomputers/Python
Commit Name: 03a971631838a1a55a14c0845ac9bcbf2fd98c3b
Time: 2020-10-01
Author: aroraraghav008@gmail.com
File Name: Letter_Counter.py
Class Name:
Method Name:


Project Name: deepchem/deepchem
Commit Name: 2350e18231a67fa9d795fe7a16919b344a4b4ce5
Time: 2017-02-05
Author: bharath.ramsundar@gmail.com
File Name: examples/kinase/KINASE_correlations.py
Class Name:
Method Name:


Project Name: rtavenar/tslearn
Commit Name: 495d64386cb00b6be050475bbff545e0a0115e94
Time: 2020-03-27
Author: johann.faouzi@gmail.com
File Name: tslearn/docs/examples/plot_lb_keogh.py
Class Name:
Method Name:


Project Name: LCAV/pyroomacoustics
Commit Name: 8ae12f01ffdb6d510181399ee34552bc7f541bc0
Time: 2017-02-20
Author: fakufaku@gmail.com
File Name: examples/room_3d.py
Class Name:
Method Name:


Project Name: deepchem/deepchem
Commit Name: 2350e18231a67fa9d795fe7a16919b344a4b4ce5
Time: 2017-02-05
Author: bharath.ramsundar@gmail.com
File Name: examples/uv/UV_correlations.py
Class Name:
Method Name:


Project Name: nipy/dipy
Commit Name: cf7d0bdc4133ea3248e054fa93aa2b5a6f8f2fca
Time: 2013-09-11
Author: stjeansam@gmail.com
File Name: doc/examples/compute_SNR_in_corpus_callosum.py
Class Name:
Method Name:


Project Name: nipy/dipy
Commit Name: 6c524d66dcd30d98a0f0c991252a3be644fa58ef
Time: 2013-09-11
Author: stjeansam@gmail.com
File Name: doc/examples/compute_SNR_in_corpus_callosum.py
Class Name:
Method Name: