febeling/rb-libsvm — Issue #6: text example, line 52
Author: thrisp
Created: 2012-03-09 22:46:18+00:00
State: open

I'm guessing that line 52 needs to be similar to the above ternary

> pred = model.predict(Libsvm::Node.features(dictionary.map{|x| test_document.include?(x) ? 1 : 0 }))

otherwise, test_document.include?(x) returns [false, false] and the entire thing errors ( no method to_f for true::trueclass, etc)

the result with the ternary, which means little right now is....

=> 543175208.0