Skip to content

Comments

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

Open
Alfiew wants to merge 1 commit intojuaml:mainfrom
Alfiew:main
Open

Added functionality to model.py and opnmf.py to run out-of-sample OPNMF.#3
Alfiew wants to merge 1 commit intojuaml:mainfrom
Alfiew:main

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