bioFAM / mofapy2

Multi-omics factor analysis v2
https://biofam.github.io/MOFA2/
GNU Lesser General Public License v3.0
34 stars 28 forks source link

Prediction on held-out data #6

Open willtownes opened 3 years ago

willtownes commented 3 years ago

Is it possible to make predictions using a fitted MEFISTO model on held-out test data that were not used in training?

willtownes commented 3 years ago

Copying over from a slack thread to hopefully boost visibility. I understand the way to do this is through the entry_point.predict_factor method. When I tried this it throws the following error. It doesn't appear to matter whether I pass in a new set of covariates or just call the method with no arguments. According to the trace the error occurs on this line.

ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 0, the array at index 0 has size 1000 and the array at index 1 has size 2363

For context, 1000 is the number of inducing points and 2363 is the number of observations in the training data.

bv2 commented 3 years ago

Hi Will, thanks for reporting this bug. This should be fixed now on the dev branch (pip install git+https://github.com/bioFAM/mofapy2@dev) and will be part of the next mofapy2 version.

khalilouardini commented 2 years ago

Hi!

Has this been fixed on the latest version (entry_point.predict_factor on held out data) please?