Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Text naive bayes classification gives wrong results #168

@RichardHoly

Description

@RichardHoly

Hello,
I am trying to work out an example of naive bayes classification of text.
I have found this example by author César Souza:
https://code.google.com/p/accord/source/browse/trunk/Sources/Accord.Tests/Accord.Tests.MachineLearning/Bayes/NaiveBayesTest.cs?spec=svn360&r=360

There is spam/lorem classification of given text strings. In the example the model is trained with the same strings as is later tested. That works. But if I try to compute classification on new strings it gives weird results:

"I decided to sign up for" is classified as "lorem"
"I decided to sign up for the" is classified as "spam"

With my attached test.cs file:
test.cs.txt

var test = new AccordTest.Test();
test.ClassifyText();

Is it a library bug or bug in the example?

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