Skip to content

Commit bc48e0b

Browse files
committed
No classes in regression modelsgit diff
1 parent 8647cbe commit bc48e0b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

converters/svm_converter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ def get_svm_as_dict(self, clf):
2020
lDict = {}
2121
lDict1 = clf.__dict__
2222
L = clf.support_vectors_.shape[0]
23+
if(hasattr(clf, "classes")):
24+
lDict["classes"] = len(clf.classes_)
2325
lDict["L"] = L
2426
lSVs = {}
2527
P = int(np.log(L) / np.log(10) + 1)
@@ -47,7 +49,6 @@ def convert_classifier(self, clf):
4749
lDict1 = clf.__dict__
4850
lDict["metadata"] = self.get_metadata(clf)
4951
lDict["options"] = self.get_model_options_as_dict(clf)
50-
lDict["classes"] = list(clf.classes_)
5152
lDict["svm_model"] = self.get_svm_as_dict(clf)
5253
return lDict
5354

0 commit comments

Comments
 (0)