mikeizbicki / HLearn

Homomorphic machine learning
Other
1.62k stars 135 forks source link

added spam classification example for perceptron #24

Closed ghost closed 11 years ago

ghost commented 11 years ago

was stuck in some other work. I tried removing the MetricSpace class and all the instances. The compiler throws errors when I do that. It specifically asks me to add the instances that I commented out.

    No instance for (MetricSpace DataPoint)
  arising from a use of `classify'
Possible fix:
  add an instance declaration for (MetricSpace DataPoint)
In the expression: classify m
In the expression: classify m $ snd inst
In an equation for `predicted_label':
    predicted_label = classify m $ snd inst
mikeizbicki commented 11 years ago

Whoops! You're right. You do need the MetricSpace, but you shouldn't need the others.

mikeizbicki commented 11 years ago

Whoops again! I was confused, and didn't read your code closely enough. You were right about needing those instances.