Answers for "reg.fit(x_train, y_train) TypeError: fit() missing 1 required positional argument: 'y'"

0

reg.fit(x_train, y_train) TypeError: fit() missing 1 required positional argument: 'y'

reg = linear_model.LinearRegression() <--- #all i did was add parentheses

xTrain, xTest, yTrain, yTest = train_test_split(dfx, dfy, test_size=0.33, random_state=42)

reg.fit(xTrain, yTrain)
Posted by: Guest on September-22-2020

Code answers related to "reg.fit(x_train, y_train) TypeError: fit() missing 1 required positional argument: 'y'"

Python Answers by Framework

Browse Popular Code Answers by Language