cb347641837feb9f651038c2f88317563a347627,libact/models/svm.py,SVM,score,#SVM#Any#,78
Before Change
if self.m == None:
raise RuntimeError("Model not trained")
X, y = zip(*testing_dataset.get_labeled_entries())
p_label, p_acc, p_val = svmutil.svm_predict(y, [x.tolist() for x in X] ,
self.m)
return p_acc[0] / 100. //ACC
After Change
return self.model.predict(feature, *args, **kwargs)
def score(self, testing_dataset, *args, **kwargs):
return self.model.score(*(testing_dataset.format_sklearn() + args), **kwargs)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: ntucllab/libact
Commit Name: cb347641837feb9f651038c2f88317563a347627
Time: 2015-12-17
Author: yangarbiter@gmail.com
File Name: libact/models/svm.py
Class Name: SVM
Method Name: score
Project Name: tensorflow/minigo
Commit Name: ba32b30cb4c43393b16ec3c7e9cb2c2a8808c690
Time: 2018-02-03
Author: andrew.m.jackson@gmail.com
File Name: strategies.py
Class Name: MCTSPlayerMixin
Method Name: show_path_to_root
Project Name: UFAL-DSG/tgen
Commit Name: 75b05cc94711e2bfe4c17014beba8408f47d1a36
Time: 2015-01-08
Author: odusek@ufal.mff.cuni.cz
File Name: tgen/planner.py
Class Name: ASearchPlanner
Method Name: run