# -*- coding: utf-8 -*-
import numpy as np
from sklearn import linear_model
from sklearn.linear_model import LinearRegression
X = np.array([[1, 1], [1, 2], [2, 2], [2, 3]])
# y = 1 * x_0 + 2 * x_1 + 3
y = np.dot(X, np.array([1, 2])) + 3
reg = LinearRegression().fit(X, y)
print(reg.score(X, y))
print(reg.coef_)
print(reg.intercept_ )
print(reg.predict(np.array([[3, 5]])))
for i in range(0, X.shape[0]):
#print(X[i].reshape(-1, 2))
print(reg.predict(X[i].reshape(-1, 2)))