koheiw / proxyC

R package for large-scale similarity/distance computation
GNU General Public License v3.0
29 stars 6 forks source link

Fix chi-squared and add test #14

Closed koheiw closed 3 years ago

koheiw commented 3 years ago

Chi-squared was not unit tested. I noticed that both proxyC::dist() and proxy::dist() are wrong in this measure. Fixed and tested using stats::chisq.test().

codecov[bot] commented 3 years ago

Codecov Report

Merging #14 (091f9a3) into master (030f624) will increase coverage by 4.80%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #14      +/-   ##
==========================================
+ Coverage   93.89%   98.69%   +4.80%     
==========================================
  Files           4        4              
  Lines         311      307       -4     
==========================================
+ Hits          292      303      +11     
+ Misses         19        4      -15     
Impacted Files Coverage Δ
src/pair.cpp 98.09% <100.00%> (+14.28%) :arrow_up:
R/proxy.R 98.92% <0.00%> (-0.03%) :arrow_down:
src/proxyc.h 100.00% <0.00%> (ø)
src/linear.cpp 98.68% <0.00%> (ø)

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 030f624...091f9a3. Read the comment docs.