Skip to content

Commit

Permalink
small issue in _prepare (didn't return the one-hot encoded values if …
Browse files Browse the repository at this point in the history
…the one_hot_encoder is fitted)
  • Loading branch information
Vaseekaran-V committed Sep 3, 2024
1 parent 37e0f59 commit 77e0603
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion prince/mca.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ def _prepare(self, X):
return X_enc
else:
X_enc = self.one_hot_encoder.transform(X)
X = pd.DataFrame(X_enc, columns=self.one_hot_encoder.get_feature_names_out(X.columns))
X_enc = pd.DataFrame(X_enc, columns=self.one_hot_encoder.get_feature_names_out(X.columns))
return X_enc
return X

@utils.check_is_dataframe_input
Expand Down

0 comments on commit 77e0603

Please sign in to comment.