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

Bug in FAMD transform() #169

Open
luismavs opened this issue Nov 12, 2023 · 1 comment
Open

Bug in FAMD transform() #169

luismavs opened this issue Nov 12, 2023 · 1 comment

Comments

@luismavs
Copy link

Hi,

I am not able to transform FAMD on "new" data.

Using version 0.13.0.

Please see the following code:

import pandas as pd
from prince import MCA, PCA, FAMD
df = pd.DataFrame({'var1':['c', 'a', 'b','c'], 'var2':['x','y','y','z'],'var2': [0.,10.,30.4,0.]})

famd = FAMD(n_components=2)
famd.fit(df[:3])
print(famd.transform(df[0:3]))
print(famd.transform(df[0:2]))
print(famd.transform(df[3:]))

I get the output:

component         0         1
0         -1.303760 -0.658334
1         -0.335621  0.981047
2          1.639381 -0.322713
component   0   1
0         NaN NaN
1         NaN NaN
component   0   1
3         NaN NaN

So FAMD is able to transform the training data itself, but NOT a selection of rows from it, or a new row.

Thanks!

@MaxHalford
Copy link
Owner

Yep that isn't supported yet. I'm aware of the issue.

@luismavs luismavs changed the title FAMD bugs in transform() Bug in FAMD transform() Nov 12, 2023
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

No branches or pull requests

2 participants