Commit 244e6796 authored by Taddeus Kroes's avatar Taddeus Kroes

Updated some comments.

parent 09073bf3
......@@ -9,7 +9,7 @@ class Classifier:
self.model = svm_load_model(filename)
else:
self.param = svm_parameter()
self.param.kernel_type = 2
self.param.kernel_type = 2 # Radial kernel type
self.param.C = c
self.model = None
......@@ -34,7 +34,7 @@ class Classifier:
self.model = svm_train(problem, self.param)
def classify(self, character):
"""Classify a character object and assign its value."""
"""Classify a character object, return its value."""
predict = lambda x: svm_predict([0], [x], self.model)[0][0]
prediction_class = predict(character.get_feature_vector())
......
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