Skip to content

Commit

Permalink
Update test_mca.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxHalford committed Dec 5, 2023
1 parent 4a640de commit 3993d2e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/test_mca.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,23 +89,23 @@ def test_with_and_without_one_hot():
>>> mca = prince.MCA(n_components=2, one_hot=True, engine="scipy")
>>> mca = mca.fit(df)
>>> mca.transform(df).round(2).abs().sort_index(axis='columns')
0 1
0 0.00 2.0
1 0.65 0.5
2 0.65 0.5
3 0.65 0.5
4 1.94 0.5
0 1
0 2.0 0.00
1 0.5 0.65
2 0.5 0.65
3 0.5 0.65
4 0.5 1.94
>>> mca = prince.MCA(n_components=2, one_hot=False, engine="scipy")
>>> one_hot = pd.get_dummies(df, columns=['foo', 'bar'])
>>> mca = mca.fit(one_hot)
>>> mca.transform(one_hot).round(2).abs().sort_index(axis='columns')
0 1
0 0.00 2.0
1 0.65 0.5
2 0.65 0.5
3 0.65 0.5
4 1.94 0.5
0 1
0 2.0 0.00
1 0.5 0.65
2 0.5 0.65
3 0.5 0.65
4 0.5 1.94
"""

Expand Down

0 comments on commit 3993d2e

Please sign in to comment.