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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tc-mateus
Copy link

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>

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

2 participants