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

Feat: Implement Inverse PCA function #312

Merged
merged 1 commit into from
Jul 3, 2024
Merged

Conversation

tc-mateus
Copy link
Contributor

Description

Implemented a new method for inverse PCA, similar to sklearn.decomposition.PCA.inverse_transform()

@tc-mateus tc-mateus changed the title feat: inverse pca implement Feat: Implement Inverse PCA function Aug 7, 2023
@YuhanLiin
Copy link
Collaborator

Can you update to latest master?

/// Transform data back to its original space
pub fn inverse_transform(
&self,
prediction: ArrayBase<ndarray::OwnedRepr<f64>, ndarray::Dim<[usize; 2]>>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can use Array2<f64>

pub fn inverse_transform(
&self,
prediction: ArrayBase<ndarray::OwnedRepr<f64>, ndarray::Dim<[usize; 2]>>,
) -> ArrayBase<ndarray::OwnedRepr<f64>, ndarray::Dim<[usize; 2]>> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Also Array2<f64>

@bytesnake bytesnake merged commit b807674 into rust-ml:master Jul 3, 2024
12 of 20 checks passed
@bytesnake
Copy link
Member

Thank you!

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.

3 participants