sklearn

Solutions on MaxInterview for sklearn by the best coders in the world

showing results for - "sklearn"
Yannic
27 Nov 2018
1pip install -U scikit-learn
Eléonore
29 Aug 2018
1from sklearn import linear_model
2regr = linear_model.LinearRegression()
3train_x = np.asanyarray(train[['ENGINESIZE']])
4train_y = np.asanyarray(train[['CO2EMISSIONS']])
5regr.fit (train_x, train_y)
6# The coefficients
7print ('Coefficients: ', regr.coef_)
8print ('Intercept: ',regr.intercept_)