diff --git a/subjects/ai/linear-regression/README.md b/subjects/ai/linear-regression/README.md index ef88f1bee..d0c851134 100644 --- a/subjects/ai/linear-regression/README.md +++ b/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 ``` diff --git a/subjects/ai/linear-regression/audit/README.md b/subjects/ai/linear-regression/audit/README.md index 6f9be4c65..68db6949a 100644 --- a/subjects/ai/linear-regression/audit/README.md +++ b/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?