dfdx / NaiveBayes.jl

Naive Bayes classifier
MIT License
25 stars 19 forks source link

Support for SparseArrays #55

Closed pazzo83 closed 2 years ago

pazzo83 commented 2 years ago

Minor refactoring of types to allow for support for sparse matrices as input (like a TF-IDF matrix or something similar). I bundled the input/feature types into aliases so both dense and sparse inputs could be supported.

codecov-commenter commented 2 years ago

Codecov Report

Merging #55 (ea902ab) into master (3bd2608) will increase coverage by 0.56%. The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #55      +/-   ##
==========================================
+ Coverage   89.32%   89.89%   +0.56%     
==========================================
  Files           7        6       -1     
  Lines         253      277      +24     
==========================================
+ Hits          226      249      +23     
- Misses         27       28       +1     
Impacted Files Coverage Δ
src/nbtypes.jl 83.63% <ø> (+1.28%) :arrow_up:
src/gaussian.jl 88.23% <66.66%> (+1.56%) :arrow_up:
src/multinomial.jl 75.00% <66.66%> (+1.31%) :arrow_up:
src/common.jl 83.72% <85.71%> (-1.28%) :arrow_down:
src/hybrid.jl 97.54% <100.00%> (+0.31%) :arrow_up:
src/NaiveBayes.jl
src/datastats.jl 90.00% <0.00%> (+0.52%) :arrow_up:
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3bd2608...ea902ab. Read the comment docs.