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.
13 lines
421 B
13 lines
421 B
2 years ago
|
# Exercise 1 Scikit-learn estimator
|
||
|
|
||
|
The goal of this exercise is to learn to fit a Scikit-learn estimator and use it to predict.
|
||
|
|
||
|
```console
|
||
|
X, y = [[1],[2.1],[3]], [[1],[2],[3]]
|
||
|
```
|
||
|
|
||
|
1. Fit a LinearRegression from Scikit-learn with X the features and y the target.
|
||
|
|
||
|
2. Predict for `x_pred = [[4]]`
|
||
|
|
||
|
3. Print the coefficients (`coefs_`) and the intercept (`intercept_`), the score (`score`) of the regression of X and y.
|