koheiw / proxyC

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

Issue 22 #23

Closed koheiw closed 2 years ago

koheiw commented 2 years ago

Generalizing the solution in #21 and enable use_nan for other methods. This change should only affect "cosine", "kullback, and "chisquared".

I also updated the README with budges, I was surprised to see that our package is downloaded 8K times every month.

codecov[bot] commented 2 years ago

Codecov Report

Merging #23 (3a54fda) into master (9677054) will increase coverage by 0.29%. The diff coverage is 96.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #23      +/-   ##
==========================================
+ Coverage   99.15%   99.44%   +0.29%     
==========================================
  Files           4        4              
  Lines         355      363       +8     
==========================================
+ Hits          352      361       +9     
+ Misses          3        2       -1     
Impacted Files Coverage Δ
src/proxyc.h 97.61% <88.88%> (-2.39%) :arrow_down:
R/proxy.R 99.08% <100.00%> (+0.03%) :arrow_up:
src/linear.cpp 100.00% <100.00%> (+1.21%) :arrow_up:
src/pair.cpp 100.00% <100.00%> (+0.74%) :arrow_up:

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 9677054...3a54fda. Read the comment docs.

koheiw commented 2 years ago

@rcannood I noticed that the test matrix (mat_test) did not have rows/columns that we want to test the functions with. I addressed the issue.

I restored replace_inf() to return NaN instead of Inf. codedcov complains it is not tested, but src/proxyc.h#L86 is executed in one of the tests.

rcannood commented 2 years ago

My apologies for the last few commits ;) Everything looks good to me!

koheiw commented 2 years ago

@rcannood thanks for reviewing.