livingsocial / ankusa Goto Github PK
View Code? Open in Web Editor NEWText classifier in Ruby that uses Hadoop/HBase, Mongo, or Cassandra for storage. DEPRECATED, use https://github.com/bmuller/ankusa
License: GNU General Public License v3.0
Text classifier in Ruby that uses Hadoop/HBase, Mongo, or Cassandra for storage. DEPRECATED, use https://github.com/bmuller/ankusa
License: GNU General Public License v3.0
Hey,
Using ankusa-0.0.13, in RVM with Ruby 1.9.3.
I found I needed to alter lib/ankusa/naive_bayes.rb in order to cope with values returned by log_likelihoods which were Infinity.
When I had categories with no matches at all they were being suggested instead of the correct one.
Replacing:
log_likelihoods(text, classes).sort_by { |c| -c[1] }.first.first
With:
log_likelihoods(text, classes).sort_by { |c| (c[1] != INFTY)? (c[1] * -1) : c[1] }.first.first
I'm not sure if you'd never come across this situation, or if this is a change of behaviour in sorting with the Infinity values.
Fix it for me anyway.
Cheers,
P.
You can currently untrain with documents that were never used for training. While this may be desired functionality, currently, total doc counts can be decremented past 0 (producing doc counts for classes < 0). Doc counts and words counts should not be allowed to decrement past 0.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.