Improvements to support naive Bayes classification of text documents
Nobody has claimed this yet.
- Dominant language
- Svelte
- Stars
- 3
- Forks
- 0
- Avg merge
- 1h 50m
- Merged PRs (30d)
- 2
Description
Currently we wrap NaiveBayes.jl, but only allow tabular input (internally converted to matrix) which limits application to NLP and elsewhere. However NaiveBayes.jl itself supports dictionary input.
There is also a text-specific NaiveBayes classifier in TextAnalysis, which accepts dictionaries (keyed on abstract strings).
I have never used either package seriously but my gut feeling is that there would be little difference in performance when using dictionaries, and would suggest we simply enhance the existing interface at MLJNaiveBayesInterface.jl rather than write a new interface. Also, there would be no reason I see to restrict to abstract string keys - any abstract dictionary with Integer values should be supportable. Such objects have the scientific type Multiset{S} where S is the scitype of the keys. So we could support any Multiset as input.
Another possibility might be to add support for sparse matrices, probably adjoints of julia's SparseArrayCSC matrices (input to MLJ model is n x p by convention). However this requires a small generalisation of the NaiveBayes package (needed anyway) which at the moment only supports concrete Matrix types.
Very happy to hear some different suggestions for improving naive bayes support.
@storopoli Perhaps this is something you would be interested in helping out with?
cc @pazzo83
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the existing MLJNaiveBayesInterface.jl wrapper with dictionary support in NaiveBayes.jl and the text-specific classifier in TextAnalysis. Clarify whether the interface should support arbitrary Multiset inputs, sparse matrices, or both, then define the chosen scope and its completion criteria before changing code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100