Skip to content

Implement realnum::rand - #251

Merged
Mec-iS merged 84 commits into
developmentfrom
implement-rand
Mar 20, 2023
Merged

Mec-iS merged 84 commits into
developmentfrom
implement-rand

Conversation

@Mec-iS

@Mec-iS Mec-iS commented Mar 20, 2023

Copy link
Copy Markdown
Collaborator

Implement rand. Use the new derive [#default]

Fixes #214

Checklist

  • My branch is up-to-date with development branch.
  • Everything works and tested on latest stable Rust.
  • Coverage and Linting have been applied

Current behaviour

realnum::rand returns 1.0

New expected behaviour

random number is generated

dependabot-preview Bot and others added 30 commits November 8, 2022 11:29
* build(deps): update nalgebra requirement from 0.23.0 to 0.26.2

Updates the requirements on [nalgebra](https://github.com/dimforge/nalgebra) to permit the latest version.
- [Release notes](https://github.com/dimforge/nalgebra/releases)
- [Changelog](https://github.com/dimforge/nalgebra/blob/dev/CHANGELOG.md)
- [Commits](dimforge/nalgebra@v0.23.0...v0.26.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* fix: updates for nalgebre

* test: explicitly call pow_mut from BaseVector since now it conflicts with nalgebra implementation

* Don't be strict with dependencies

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
Updates the requirements on [nalgebra](https://github.com/dimforge/nalgebra) to permit the latest version.
- [Release notes](https://github.com/dimforge/nalgebra/releases)
- [Changelog](https://github.com/dimforge/nalgebra/blob/dev/CHANGELOG.md)
- [Commits](dimforge/nalgebra@v0.23.0...v0.31.0)

---
updated-dependencies:
- dependency-name: nalgebra
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
* initial fastpair implementation
* FastPair initial implementation
* implement fastpair
* Add random test
* Add bench for fastpair
* Refactor with constructor for FastPair
* Add serialization for PairwiseDistance
* Add fp_bench feature for fastpair bench
* Add example

* Move to top

* Add imports to example

* Fix imports
* docs: Fix typo in doc for categorical transformer.
* feat: Add option to take a column from Matrix.
I created the method `Matrix::take_column` that uses the `Matrix::take`-interface to extract a single column from a matrix. I need that feature in the implementation of  `StandardScaler`.
* feat: Add `StandardScaler`.
Authored-by: titoeb <timtoebrock@googlemail.com>
* Derive `serde::Serialize` and `serde::Deserialize` for
  `StandardScaler`.
* Add relevant unit test.

Signed-off-by: Christos Katsakioris <ckatsak@gmail.com>

Signed-off-by: Christos Katsakioris <ckatsak@gmail.com>
* Update criterion requirement from 0.3 to 0.4

Updates the requirements on [criterion](https://github.com/bheisler/criterion.rs) to permit the latest version.
- [Release notes](https://github.com/bheisler/criterion.rs/releases)
- [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md)
- [Commits](bheisler/criterion.rs@0.3.0...0.4.0)

---
updated-dependencies:
- dependency-name: criterion
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix criterion

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
* handle multiclass precision/recall
* grid search draft
* hyperparam search for linear estimators
* feat: Add interface to build `Matrix` from rows.
* feat: Add option to derive `RealNumber` from string.
To construct a `Matrix` from csv, and therefore from string, I need to be able to deserialize a generic `RealNumber` from string.
* feat: Implement `Matrix::read_csv`.
…#160)

* fix: fix compilation warnings when running only with default features
Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
#159)

* feat: allocate first and then proceed to create matrix from Vec of RowVectors
* grid search draft

* hyperparam search for linear estimators

* grid search for ensembles

* support grid search for more algos

* grid search for unsupervised algos

* minor cleanup
* Provide better output in flaky tests

* feat: add seed parameter to multiple algorithms

* Update changelog

Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
* add seed param to search params

* make default params available to serde

* lints

* create defaults for enums

* lint
* feat: expose hyper tuning module in model_selection

* Move to a folder

Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
Mec-iS and others added 9 commits November 8, 2022 11:29
* Fixes for release
* add new test
* Remove change applied in development branch
* Only add dependency for wasm32
* Update ci.yml

Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
Co-authored-by: Lorenzo <tunedconsulting@gmail.com>
* Handle kernel serialization
* Do not use typetag in WASM
* enable tests for serialization
* Update serde feature deps

Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
Co-authored-by: Lorenzo <tunedconsulting@gmail.com>
@Mec-iS
Mec-iS requested a review from morenol March 20, 2023 13:14
@codecov-commenter

codecov-commenter commented Mar 20, 2023 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.49%. Comparing base (7d059c4) to head (362c3f9).
⚠️ Report is 50 commits behind head on development.

Files with missing lines Patch % Lines
src/ensemble/random_forest_classifier.rs 66.66% 1 Missing ⚠️
src/tree/decision_tree_classifier.rs 66.66% 1 Missing ⚠️
src/tree/decision_tree_regressor.rs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development     #251      +/-   ##
===============================================
+ Coverage        44.36%   44.49%   +0.12%     
===============================================
  Files               85       85              
  Lines             7220     7226       +6     
===============================================
+ Hits              3203     3215      +12     
+ Misses            4017     4011       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/numbers/realnum.rs Outdated
@Mec-iS

Mec-iS commented Mar 20, 2023

Copy link
Copy Markdown
Collaborator Author

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

Comment thread src/numbers/realnum.rs Outdated
@morenol

morenol commented Mar 20, 2023

Copy link
Copy Markdown
Collaborator

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

Can you bump the version on this PR?

Comment thread src/cluster/dbscan.rs
morenol
morenol previously approved these changes Mar 20, 2023

@morenol morenol left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@Mec-iS

Mec-iS commented Mar 20, 2023

Copy link
Copy Markdown
Collaborator Author

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

morenol commented Mar 20, 2023

Copy link
Copy Markdown
Collaborator

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

I like that idea!

@morenol

morenol commented Mar 20, 2023

Copy link
Copy Markdown
Collaborator

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

@Mec-iS

Mec-iS commented Mar 20, 2023 •

Copy link
Copy Markdown
Collaborator Author

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.

@Mec-iS
Mec-iS merged commit f498f96 into development Mar 20, 2023
@Mec-iS
Mec-iS deleted the implement-rand branch March 20, 2023 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Randomness: implementation and use getrandom for Wasm target

9 participants