fafa0d446b657f2261b9676a229e975f2ed9db2d,qanta/guesser/classify/learn_classifiers.py,,evaluate,#Any#Any#Any#Any#,113

Before Change


                protocol=pickle.HIGHEST_PROTOCOL)

    train_accuracy = nltk.classify.util.accuracy(classifier, train_vector)
    test_accuracy = nltk.classify.util.accuracy(classifier, test_vector)
    log.info("accuracy train: {0}".format(train_accuracy))
    log.info("accuracy test: {0}".format(test_accuracy))

After Change



    test_feats = []
    test_labels = []
    for e in test_vector:
         test_feats.append(e[0])
         test_labels.append(e[1])

    classifier = OneVsRestClassifier(LogisticRegression(C=10), n_jobs=-1)
    classifier.fit(train_feats, train_labels)

    pickle.dump(classifier, open(DEEP_DAN_CLASSIFIER_TARGET, "wb"),
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: Pinafore/qb
Commit Name: fafa0d446b657f2261b9676a229e975f2ed9db2d
Time: 2016-07-17
Author: ubuntu@ip-172-31-18-5.us-west-1.compute.internal
File Name: qanta/guesser/classify/learn_classifiers.py
Class Name:
Method Name: evaluate


Project Name: bearpaw/pytorch-pose
Commit Name: dc9a7266ed6693f9a835ab411f85fa56e77065a8
Time: 2017-06-14
Author: platero.yang@gmail.com
File Name: example/mpii.py
Class Name:
Method Name: train


Project Name: d2l-ai/d2l-zh
Commit Name: 3a770cbc97085c2cd4eaa0a46b2bc037f35389c2
Time: 2017-10-25
Author: muli@cs.cmu.edu
File Name: utils.py
Class Name:
Method Name: evaluate_accuracy