Skip to content

Commit

Permalink
feat(linear-regression): update example code to match examples
Browse files Browse the repository at this point in the history
  • Loading branch information
nprimo committed Nov 27, 2023
1 parent 463aaa7 commit 6748df1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 25 deletions.
2 changes: 1 addition & 1 deletion subjects/ai/linear-regression/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
29 changes: 5 additions & 24 deletions subjects/ai/linear-regression/audit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit 6748df1

Please sign in to comment.