-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update bayes.rb #44
Update bayes.rb #44
Conversation
Added ability to handle and array of classifications to the constructor.
@MadBomber can you include the example in the read me? @parkr I think this is fine, but do you think it needs any additional tests? |
Okay I will update the README and look at adding a test. It may be a day or two before I get back into it.
|
Yeah this will require a test. I wonder if folks use arrays for the category key. I can't imagine they do, but I can't say definitively one way or another. |
This mod makes it soe that you can train categories that have not been previously defined in the constructor.
I added some test cases but didn't test the test cases... too meta
Update bayesian_test.rb
Well that was my nights entertainment. I didn't test the tests. I also notice at least one typo in a string that didn't make sense in English. #train 'Ruby', 'I sweet language' .... like what does that mean. Dewayne |
Yeah, I've personally written code that does something similar to this, but from outside of the gem, so I like it. Once this passes tests, I'd be happy to merge it in. Then I think we need to address #42 and get a |
just pushed a typo fix to the test file. tests are passing. ought to consider updating from test-unit to minitest |
Agreed on minitest, I'll add it to the list on #42. |
Added ability to handle an array of classifications to the constructor.
with this patch you can now do things like: