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

Added functionality to model.py and opnmf.py to run out-of-sample OPNMF. #3

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

Conversation

Alfiew
Copy link

@Alfiew Alfiew commented Nov 27, 2024

Created a 'transform' function, to enable running out-of-sample OPNMF.

estimator = opnmf.model.OPNMF(n_components=n)

As before, to fit and transform a given dataset

W = estimator.fit_transform(data)

New addition, to then transform a different dataset (same structure)

H, mse = estimator.transform(new_data)

@fraimondo
Copy link
Contributor

Hi @Alfiew !

Thanks for this contribution. I was actually working on this myself last week and did not manage to finish it.

Can you add a very simple test?

The idea is that a fit_transform(X) call should output the same as .fit(X).transform(X) call.

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.

2 participants