Browse Source

feat(linear-regression): update example code to match examples

pull/2317/head
nprimo 12 months ago committed by Niccolò Primo
parent
commit
6748df1495
  1. 2
      subjects/ai/linear-regression/README.md
  2. 29
      subjects/ai/linear-regression/audit/README.md

2
subjects/ai/linear-regression/README.md

@ -180,7 +180,7 @@ The data set used is described in https://scikit-learn.org/stable/modules/genera
```python
from sklearn.datasets import load_diabetes
diabetes = load_diabetes()
diabetes = load_diabetes(as_frame=True)
X, y = diabetes.data, diabetes.target
```

29
subjects/ai/linear-regression/audit/README.md

@ -109,30 +109,11 @@ y_test:
###### For question 1, is the output of `y_train.values[:10]` and `y_test.values[:10]` the following?
```console
y_train.values[:10]:
[[202.]
[ 55.]
[202.]
[ 42.]
[214.]
[173.]
[118.]
[ 90.]
[129.]
[151.]]
y_test.values[:10]:
[[ 71.]
[ 72.]
[235.]
[277.]
[109.]
[ 61.]
[109.]
[ 78.]
[ 66.]
[192.]]
```python
print(y_train.values[:10])
[202. 55. 202. 42. 214. 173. 118. 90. 129. 151.]
print(y_test.values[:10])
[ 71. 72. 235. 277. 109. 61. 109. 78. 66. 192.]
```
###### For question 2, are the coefficients and the intercept the following?

Loading…
Cancel
Save