From 3993d2e25045311df3b2cb85b927a99dd4003630 Mon Sep 17 00:00:00 2001 From: Max Halford Date: Tue, 5 Dec 2023 16:25:53 +0100 Subject: [PATCH] Update test_mca.py --- tests/test_mca.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/test_mca.py b/tests/test_mca.py index 7671ce01..e9bc05a3 100644 --- a/tests/test_mca.py +++ b/tests/test_mca.py @@ -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 """