We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8647cbe commit bc48e0bCopy full SHA for bc48e0b
converters/svm_converter.py
@@ -20,6 +20,8 @@ def get_svm_as_dict(self, clf):
20
lDict = {}
21
lDict1 = clf.__dict__
22
L = clf.support_vectors_.shape[0]
23
+ if(hasattr(clf, "classes")):
24
+ lDict["classes"] = len(clf.classes_)
25
lDict["L"] = L
26
lSVs = {}
27
P = int(np.log(L) / np.log(10) + 1)
@@ -47,7 +49,6 @@ def convert_classifier(self, clf):
47
49
48
50
lDict["metadata"] = self.get_metadata(clf)
51
lDict["options"] = self.get_model_options_as_dict(clf)
- lDict["classes"] = list(clf.classes_)
52
lDict["svm_model"] = self.get_svm_as_dict(clf)
53
return lDict
54
0 commit comments