Git Product home page Git Product logo

hoatzin's Issues

NoMethodError on the subsequent classify call

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.

NoMethodError: You have a nil object when you didn't expect it! on classify method

c.classify('Testig Document')
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/karthikselva/.rvm/gems/ruby-1.8.7-p358/gems/hoatzin-0.2.1/lib/feature_vector/builder.rb:74:in build_vector' from /home/karthikselva/.rvm/gems/ruby-1.8.7-p358/gems/hoatzin-0.2.1/lib/feature_vector/builder.rb:28:inbuild_query_vector'
from /home/karthikselva/.rvm/gems/ruby-1.8.7-p358/gems/hoatzin-0.2.1/lib/classifier.rb:59:in `classify'
from (irb):6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.