e53691300371810b3f0052b811e92fd4ccb5f0c1,category_encoders/leave_one_out.py,LeaveOneOutEncoder,transform,#LeaveOneOutEncoder#Any#Any#Any#,156
Before Change
// if we are encoding the training data, we have to check the target
if y is not None:
if isinstance(y, pd.DataFrame):
y = y.iloc[:, 0].astype(float)
else:
y = pd.Series(y, name="target", index=X.index)
if X.shape[0] != y.shape[0]:
raise ValueError("The length of X is " + str(X.shape[0]) + " but length of y is " + str(y.shape[0]) + ".")
if not self.cols:
After Change
// if we are encoding the training data, we have to check the target
if y is not None:
y = util.convert_input_vector(y, X.index).astype(float)
if X.shape[0] != y.shape[0]:
raise ValueError("The length of X is " + str(X.shape[0]) + " but length of y is " + str(y.shape[0]) + ".")
if not self.cols:
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 14
Instances Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: e53691300371810b3f0052b811e92fd4ccb5f0c1
Time: 2019-02-11
Author: jan@motl.us
File Name: category_encoders/leave_one_out.py
Class Name: LeaveOneOutEncoder
Method Name: transform
Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: e53691300371810b3f0052b811e92fd4ccb5f0c1
Time: 2019-02-11
Author: jan@motl.us
File Name: category_encoders/leave_one_out.py
Class Name: LeaveOneOutEncoder
Method Name: fit
Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: e53691300371810b3f0052b811e92fd4ccb5f0c1
Time: 2019-02-11
Author: jan@motl.us
File Name: category_encoders/cat_boost.py
Class Name: CatBoostEncoder
Method Name: fit
Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: e53691300371810b3f0052b811e92fd4ccb5f0c1
Time: 2019-02-11
Author: jan@motl.us
File Name: category_encoders/cat_boost.py
Class Name: CatBoostEncoder
Method Name: transform