Answers for "typeerror: __init__() got an unexpected keyword argument 'num_training_steps'"

0

TypeError: __init__() got an unexpected keyword argument 'categorical_features\

# Encoding categorical data
from sklearn.preprocessing import LabelEncoder, OneHotEncoder
from sklearn.compose import ColumnTransformer # Here is the one

labelencoder_X_1 = LabelEncoder()
X[:, 1] = labelencoder_X_1.fit_transform(X[:, 1])

labelencoder_X_2 = LabelEncoder()
X[:, 2] = labelencoder_X_2.fit_transform(X[:, 2])

#onehotencoder = OneHotEncoder(categorical_features = [1]) Not this one

# use this instead
ct = ColumnTransformer([("Country", OneHotEncoder(), [1])], remainder = 'passthrough')

X = ct.fit_transform(X)
X = X[:, 1:])
Posted by: Guest on April-08-2022

Code answers related to "typeerror: __init__() got an unexpected keyword argument 'num_training_steps'"

Code answers related to "Assembly"

Browse Popular Code Answers by Language