Skip to content

Commit

Permalink
Convert encoding to dict
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaudioSalvatoreArcidiacono committed Jan 2, 2025
1 parent cc84a2d commit 7e6be52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sklearo/encoding/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def fit(self, X: IntoFrameT, y: IntoSeriesT) -> "BaseTargetEncoder":
)
if self.unseen == "fill" and self.fill_value_unseen == "mean":
self.mean_target_[class_] = X_y_binarized[target_col_name].mean()

self.encoding_map_ = dict(self.encoding_map_)
else:
for column in self.columns_:
self.encoding_map_[column] = self._calculate_target_statistic(
Expand Down

0 comments on commit 7e6be52

Please sign in to comment.