Skip to content

Commit

Permalink
Change double to float
Browse files Browse the repository at this point in the history
  • Loading branch information
mausam3407 authored Nov 21, 2023
1 parent 0be576d commit 6138f39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion category_encoders/cat_boost.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def __init__(self, verbose=0, cols=None, drop_invariant=False, return_df=True,

def _fit(self, X, y, **kwargs):
X = X.copy(deep=True)
y = y.astype('double') #Incase y is bool.
y = y.astype(float) #Incase y is bool or categorical.
self._mean = y.mean()
self.mapping = {col: self._fit_column_map(X[col], y) for col in self.cols}

Expand Down

0 comments on commit 6138f39

Please sign in to comment.