Why this model fit function has value error? I have no idea how to solve it

13 views Asked by At
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
model = LogisticRegression()
model.fit(X_train, y_train)

22 X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
23 model = LogisticRegression()
\---\> 24 model.fit(X_train, y_train)
27 app = Flask(__name__)
29 @app.route('/')
30 def home():

After encode the non-numerical value into one-hot encoding, i noticed that the model fit function cannot be executed. Is there problem with my code?

0

There are 0 answers