mirror of https://github.com/01-edu/Branch-AI.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
421 B
421 B
Exercise 1 Scikit-learn estimator
The goal of this exercise is to learn to fit a Scikit-learn estimator and use it to predict.
X, y = [[1],[2.1],[3]], [[1],[2],[3]]
-
Fit a LinearRegression from Scikit-learn with X the features and y the target.
-
Predict for
x_pred = [[4]]
-
Print the coefficients (
coefs_
) and the intercept (intercept_
), the score (score
) of the regression of X and y.