87ce5a9cb09ea8ff0d7a90fdab2eeab0115d7c09,examples/feat_bagging_example.py,,,#,14

Before Change


    //     n_train=n_train, n_test=n_test, contamination=contamination)
    mat_file = "cardio.mat"

    try:
        mat = loadmat(os.path.join("example_data", mat_file))

    except TypeError:
        print("{data_file} does not exist. Use generated data".format(
            data_file=mat_file))
        X, y = generate_data(train_only=True)  // load data
    except IOError:
        print("{data_file} does not exist. Use generated data".format(
            data_file=mat_file))
        X, y = generate_data(train_only=True)  // load data
    else:
        X = mat["X"]
        y = mat["y"].ravel()

    X_train, X_test, y_train, y_test = train_test_split(X, y,
                                                        test_size=0.4,
                                                        random_state=2)
    

After Change


    y_train_scores = clf.decision_scores_  // raw outlier scores

    // get the prediction on the test data
    y_test_pred = clf.predict(X_test)  // outlier labels (0 or 1)
    y_test_scores = clf.decision_function(X_test)  // outlier scores

    // evaluate and print the results
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: yzhao062/pyod
Commit Name: 87ce5a9cb09ea8ff0d7a90fdab2eeab0115d7c09
Time: 2018-06-04
Author: yuezhao@cs.toronto.edu
File Name: examples/feat_bagging_example.py
Class Name:
Method Name:


Project Name: yahoo/TensorFlowOnSpark
Commit Name: 981e4266d4ea816b08a762193bd52f40cd1a3242
Time: 2019-08-07
Author: leewyang@verizonmedia.com
File Name: examples/mnist/keras/mnist_inference.py
Class Name:
Method Name: inference


Project Name: alfredfrancis/ai-chatbot-framework
Commit Name: d68beca6f553622b92f2709cf984023dbf284e98
Time: 2016-12-23
Author: alfred.francis@pearldatadirect.com
File Name: core/intentClassifier.py
Class Name: IntentClassifier
Method Name: predict