e1e9d315a8615a88f37e1443fdb277a46475fd50,qanta/extractors/classifier.py,Classifier,score_guesses,#Classifier#Any#Any#,21
Before Change
"{class_type}_{label}:{p}".format(class_type=class_type, label=label, p=-1)
)
else:
for label, p in zip(classifier.classes_, probabilities[0]):
features.append(
"{class_type}_{label}:{p}".format(class_type=class_type, label=label, p=p)
)
After Change
for g in guesses:
features = ["|classifier"]
for class_type in self.classifiers.keys():
if g in self.guess_properties[class_type]:
prop = self.guess_properties[class_type][g]
for label, p in zipped[class_type]:
if label == prop:
features.append(
"{class_type}_{label}:{p}".format(
class_type=class_type,
label=label,
p=p
)
)
yield " ".join(features)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: Pinafore/qb
Commit Name: e1e9d315a8615a88f37e1443fdb277a46475fd50
Time: 2017-03-21
Author: ski.rodriguez@gmail.com
File Name: qanta/extractors/classifier.py
Class Name: Classifier
Method Name: score_guesses
Project Name: tensorflow/cleverhans
Commit Name: 6667fb34f81f5c523c97952f1ea5fe0ba6d769bd
Time: 2017-06-21
Author: papernot@google.com
File Name: cleverhans/model.py
Class Name: KerasModelWrapper
Method Name: fprop
Project Name: dnouri/skorch
Commit Name: 53ef00376510ee9ba4506918db06b25dad4a7ea4
Time: 2017-07-31
Author: benjamin.bossan@ottogroup.com
File Name: inferno/callbacks.py
Class Name: BestLoss
Method Name: initialize