2f1f4adb504fd6a91027a091a4e5e911a4d7c905,finetune/datasets/mcdonalds_yelp_sentiment.py,,,#,39

Before Change


    model = MultiLabelClassifier(verbose=True, n_epochs=2)
    trainX, testX, trainY, testY = train_test_split(dataset.Text, dataset.Target, test_size=0.3, random_state=42)
    model.fit(trainX, trainY)
    accuracy = np.mean(model.predict(testX) == testY)
    print("Test Accuracy: {:0.2f}".format(accuracy))

After Change


    trainX, testX, trainY, testY = train_test_split(dataset.Text, dataset.Target, test_size=0.3, random_state=42)
    model.fit(trainX, trainY)
    for threshold in np.linspace(0, 1, 5):
        print("Threshold = {}".format(threshold))
        print(classification_report(
            model.label_encoder.transform(testY),
            model.label_encoder.transform(model.predict(testX, threshold=threshold))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: IndicoDataSolutions/finetune
Commit Name: 2f1f4adb504fd6a91027a091a4e5e911a4d7c905
Time: 2018-08-03
Author: benlt@hotmail.co.uk
File Name: finetune/datasets/mcdonalds_yelp_sentiment.py
Class Name:
Method Name:


Project Name: lcswillems/torch-rl
Commit Name: 77aa13468aeac44d28bec7928c4264d198d3588e
Time: 2018-04-11
Author: lcswillems@gmail.com
File Name: core/a2c.py
Class Name:
Method Name: a2c_step


Project Name: SheffieldML/GPy
Commit Name: 350497c72606f188f83b68588140f0058190559b
Time: 2013-04-16
Author: ibinbei@gmail.com
File Name: GPy/examples/dimensionality_reduction.py
Class Name:
Method Name: mrd_simulation


Project Name: datascienceinc/Skater
Commit Name: 0bab786d05391d24fd101f3aed71e6f4b3f14b55
Time: 2017-05-08
Author: aikramer2@gmail.com
File Name: lynxes/core/global_interpretation/feature_importance.py
Class Name: FeatureImportance
Method Name: feature_importance