## Modeling 하시오
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error
lm = LinearRegression()
train_set.head()
train_x = train_set[['Temperature', 'Leaflets']]
train_y = train_set[['Lemon']]
test_x = test_set[['Temperature', 'Leaflets']]
test_y = test_set[['Lemon']]
lm.fit(train_x, train_y)
y_pred = lm.predict(test_x)
mse = mean_squared_error(y_pred, test_y)
print(lm.coef_)
print(lm.intercept_)
print(mse)
'Develop > AI' 카테고리의 다른 글
MNIST (0) | 2019.07.14 |
---|---|
placeholder / feed_dick (0) | 2019.07.14 |