Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PLS family algorithms #95

Merged
merged 21 commits into from
Mar 19, 2021
Merged

Add PLS family algorithms #95

merged 21 commits into from
Mar 19, 2021

Conversation

relf
Copy link
Member

@relf relf commented Mar 14, 2021

This PR implements PLS methods in a new workspace member linfa-pls.

This is a straightforward port of scikit-learn 0.24 cross decomposition PLS code.

  • PLS regression
  • PLS canonical
  • PLS cca
  • PLS svd
  • documentation & website

@relf relf marked this pull request as ready for review March 17, 2021 14:19
@relf relf changed the title [WIP] Add PLS family algorithms Add PLS family algorithms Mar 17, 2021
Copy link
Member

@bytesnake bytesnake left a comment

Choose a reason for hiding this comment

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

I did a first round of review on the PR 👍

algorithms/linfa-pls/src/lib.rs Outdated Show resolved Hide resolved
algorithms/linfa-pls/src/lib.rs Outdated Show resolved Hide resolved
algorithms/linfa-pls/src/lib.rs Show resolved Hide resolved

#[cfg(test)]
mod test {
use super::*;
Copy link
Member

Choose a reason for hiding this comment

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

the tests are currently only checking that the fitting process runs without error

Copy link
Member Author

Choose a reason for hiding this comment

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

I think transform and predict were at least covered but I guess I can add some tests checking that we get the same results as scikit-learn.

algorithms/linfa-pls/src/pls_generic.rs Show resolved Hide resolved
algorithms/linfa-pls/src/pls_generic.rs Outdated Show resolved Hide resolved
algorithms/linfa-pls/src/pls_generic.rs Outdated Show resolved Hide resolved
algorithms/linfa-pls/src/pls_generic.rs Show resolved Hide resolved
algorithms/linfa-pls/src/pls_generic.rs Show resolved Hide resolved
algorithms/linfa-pls/src/pls_svd.rs Show resolved Hide resolved
@relf
Copy link
Member Author

relf commented Mar 18, 2021

Nothing to add on my side... Well, after this first round! 😅

};
}

// Prediction values were checked against scikit-learn 0.24.1
Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member

@bytesnake bytesnake left a comment

Choose a reason for hiding this comment

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

thanks again for all the work! I will add a small example to the website as well

@bytesnake bytesnake merged commit b6f729a into rust-ml:master Mar 19, 2021
@bytesnake bytesnake mentioned this pull request Mar 19, 2021
24 tasks
@relf relf deleted the ft-pls-regression branch March 19, 2021 08:33
@relf relf mentioned this pull request Mar 19, 2021
3 tasks
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.

None yet

3 participants