Add CategoricalNB
Added CategoricalNB :)
Hi @ksew1 and thanks for the pull request! Looks great on the first look and I will be having a detailed review soon.
I've Dropped some minor comments, but LGMT. There are some part that are common for all of NB algorithms. I think that it will be cool to separate them into
utils.exinsidenaive_bayesdir. But it's not necessary as a scope of this PR.
I’ve addressed all the comments 😄. I agree that it would be a good idea to extract the common parts into a separate file. I’ll do this in a separate PR.
Any reason why num_categories isn't a required option?
Any reason why
num_categoriesisn't a required option?
num_categories isn’t needed as an option since it’s just an implementation detail. We can easily calculate it from min_categories, which the user can already specify, so i think adding it would just be redundant
@josevalim @msluszniak I am still having a look. Seems very good, but please give me some time before merging. I might have some improvements to suggest (e.g. maybe the code can be vectorised; this could be valuable for @ksew1 to learn in case they don't know it already).
Happy New Year everyone!