Commit 0b97547d authored by Taddeüs Kroes's avatar Taddeüs Kroes

StatRed ass3: Finished part 3.

parent b9a4a734
...@@ -65,9 +65,8 @@ class MEC: ...@@ -65,9 +65,8 @@ class MEC:
class SVM: class SVM:
def __init__(self, X, c): def __init__(self, X, c):
px = svm_problem(c.tolist(), X.T) self.model = svm_model(svm_problem(c, X.T),
pm = svm_parameter(kernel_type=LINEAR) pm,svm_parameter(kernel_type=LINEAR))
self.model = svm_model(px, pm)
def classify(self, x): def classify(self, x):
return self.model.predict(x) return self.model.predict(x)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment