Skip to content

NoMethodError on the subsequent classify call #1

@moedusa

Description

@moedusa

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:inbuild_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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions