smartcorelib / smartcore

A comprehensive library for machine learning and numerical computing. The library provides a set of tools for linear algebra, numerical computing, optimization, and enables a generic, powerful yet still efficient approach to machine learning.
https://smartcorelib.org/
Apache License 2.0
671 stars 76 forks source link

Implement realnum::rand #251

Closed Mec-iS closed 1 year ago

Mec-iS commented 1 year ago

Implement rand. Use the new derive [#default]

Fixes #214

Checklist

Current behaviour

realnum::rand returns 1.0

New expected behaviour

random number is generated

codecov-commenter commented 1 year ago

Codecov Report

Merging #251 (c5ccce9) into development (7d059c4) will increase coverage by 0.08%. The diff coverage is 33.33%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@               Coverage Diff               @@
##           development     #251      +/-   ##
===============================================
+ Coverage        44.36%   44.44%   +0.08%     
===============================================
  Files               85       85              
  Lines             7220     7218       -2     
===============================================
+ Hits              3203     3208       +5     
+ Misses            4017     4010       -7     
Impacted Files Coverage Δ
src/algorithm/neighbour/mod.rs 42.85% <ø> (+2.85%) :arrow_up:
src/linear/logistic_regression.rs 38.34% <ø> (+0.19%) :arrow_up:
src/linear/ridge_regression.rs 41.22% <ø> (+0.35%) :arrow_up:
src/neighbors/mod.rs 100.00% <ø> (+16.66%) :arrow_up:
src/tree/decision_tree_classifier.rs 50.57% <0.00%> (+0.19%) :arrow_up:
src/numbers/realnum.rs 40.90% <50.00%> (+10.90%) :arrow_up:

... and 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Mec-iS commented 1 year ago

thanks @morenol I need a 0.3.1 release asap! 👍🏼

morenol commented 1 year ago

thanks @morenol I need a 0.3.1 release asap! 👍🏼

Can you bump the version on this PR?

Mec-iS commented 1 year ago

LGTM but not sure why ignore was added to one of the doc tests

that test uses datasets feature so it fails, it is replicated among the tests with the right flag.

I may have more changes in the next hours, I am adding anti-panicking checks to fit methods.

morenol commented 1 year ago

I may have more changes in the next hours, I am adding anti-panicking checks to fit methods.

I like that idea!

morenol commented 1 year ago

It seems that there is conflicts, it says to me that there are 83 commits on this PR, could you rebase?

Mec-iS commented 1 year ago

It seems that there is conflicts, it says to me that there are 83 commits on this PR, could you rebase?

that is because I pushed the wrong branch at the creation of the PR, then I corrected it. Check in "Files Changed" that the changes are only the latest ones.

EDIT: your local branch may be missing the "Update README.md" I pushed before this PR.