Git Product home page Git Product logo

java-naive-bayes-classifier's People

Contributors

davidantoon avatar fergalmonaghan avatar marijnkoesen avatar ptnplanet avatar yuripourre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

java-naive-bayes-classifier's Issues

Classifier is not serializable

I tried to serialize a classifier I train on my data set but it turn out that it uses a non serializable object. The "Classifier" class in itself implements serializable but I am not quit sure which class it uses does not.
Thank you and great work with the naive Bayes classifier.

de.daslaboratorium.machinelearning.classifier.Classifier#featureProbability

via Classifier code i guess the featureProbability should not bigger than 1.0, but I found that if have 2+ "I" in the trainning material, I got the featureProbability more than 1.0+. following is the code snippet:
in test change the learn material like:
final String[] positiveText = "I happy now, I like you".split("\\s");

print some info in featureProbability :

float featureCount = (float) this.featureCount(feature, category);
float categoryCount = (float) this.categoryCount(category);
System.out.println("raw p(f|c) " + String.valueOf(feature) + featureCount + "->" + String.valueOf(category) + categoryCount + "->" + featureCount / categoryCount); return featureCount / categoryCount;

then the output:

raw p(f|c) I2.0->positive1.0->2.0

does the result is correct? or can you clearfy what the math model to calc p(f|c)?

Probability Returning Infinity for most Categories

Hello,

I know you haven't worked on this in a while but was wondering if you had any idea why I keep seeing this issue. I have added about 25 categories to the model with lots of data in each category. For the majority of the categories no matter what I feed in when I classify a chunk of text most of the categories return a probability of infinity.

ex.

Classification[
category=friends_gatherings,
probability=Infinity,
featureset=[
after,
school,
soccerabout,
this,
...
--
]
]

classifying only to particular class

I am using double[] as feature instead of string in runnableExample, but the feature of class -ve is still classifying as +ve. And in featureCount, I am not getting any value other than null.

Using database

Hello.
Is there any way to store results of the learning as experience data in my database?

What does weight,assumedProbability parameters do?

Hi, thanks for simple and well working code.
I have some question featureWeighedAverage method.
What does these parameter do? Is it like Laplace smoothness term?

  • weight
  • assumedProbability

It would be helpful for me if there is a paper to refer to the weighted average formula used in the featureWeighedAverage method.

Documentation

The documentation is referenced in the readme file but there is no link to it? pls help thanks (also kinda new to java so might be a stupid question - any help is well appreciated)

Store Classifier

Is it possible to save/load (maybe some kind of serialization/deserialization) the trained classifier?

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.