-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Hello, perhaps I've just missed something, but I see some strange behaviour when calling classify method for several times. The first call goes with no error, but any subsequent results the error below:
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.length
from /home/moe/.rvm/gems/ruby-1.9.2-p0/gems/hoatzin-0.2.1/lib/feature_vector/builder.rb:74:in build_vector' from /home/moe/.rvm/gems/ruby-1.9.2-p0/gems/hoatzin-0.2.1/lib/feature_vector/builder.rb:28:in
build_query_vector'
from /home/moe/.rvm/gems/ruby-1.9.2-p0/gems/hoatzin-0.2.1/lib/classifier.rb:59:in `classify'
I've created a very simple class (https://gist.github.com/869573) to test hoatzin and it seems I am doing something wrong... I am calling train method on my class first, then classify, first call is ok, subsequent - fails.