Skip to content

Commit 1c40b1c

Browse files
authored
minor improvements in wording and import statement order (#841)
* minor improvment in wording and import statement order * use pre-commit hooks
1 parent ee3bf0e commit 1c40b1c

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

notebooks/linear_models_ex_02.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"disease. This would depend on the patient's Body Mass Index which is defined\n",
2323
"as `weight / height ** 2`.\n",
2424
"\n",
25-
"We load the dataset penguins dataset. We first use a set of 3 numerical\n",
25+
"We load the penguins dataset. We first use a set of 3 numerical\n",
2626
"features to predict the target, i.e. the body mass of the penguin."
2727
]
2828
},

notebooks/linear_models_sol_02.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"disease. This would depend on the patient's Body Mass Index which is defined\n",
2323
"as `weight / height ** 2`.\n",
2424
"\n",
25-
"We load the dataset penguins dataset. We first use a set of 3 numerical\n",
25+
"We load the penguins dataset. We first use a set of 3 numerical\n",
2626
"features to predict the target, i.e. the body mass of the penguin."
2727
]
2828
},

notebooks/linear_regression_non_linear_link.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@
119119
"metadata": {},
120120
"outputs": [],
121121
"source": [
122+
"from sklearn.metrics import mean_squared_error\n",
123+
"\n",
124+
"\n",
122125
"def fit_score_plot_regression(model, title=None):\n",
123126
" model.fit(data, target)\n",
124127
" target_predicted = model.predict(data)\n",
@@ -147,7 +150,6 @@
147150
"outputs": [],
148151
"source": [
149152
"from sklearn.linear_model import LinearRegression\n",
150-
"from sklearn.metrics import mean_squared_error\n",
151153
"\n",
152154
"linear_regression = LinearRegression()\n",
153155
"linear_regression"

python_scripts/linear_models_ex_02.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# disease. This would depend on the patient's Body Mass Index which is defined
3131
# as `weight / height ** 2`.
3232
#
33-
# We load the dataset penguins dataset. We first use a set of 3 numerical
33+
# We load the penguins dataset. We first use a set of 3 numerical
3434
# features to predict the target, i.e. the body mass of the penguin.
3535

3636
# %% [markdown]

python_scripts/linear_models_sol_02.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# disease. This would depend on the patient's Body Mass Index which is defined
2525
# as `weight / height ** 2`.
2626
#
27-
# We load the dataset penguins dataset. We first use a set of 3 numerical
27+
# We load the penguins dataset. We first use a set of 3 numerical
2828
# features to predict the target, i.e. the body mass of the penguin.
2929

3030
# %% [markdown]

python_scripts/linear_regression_non_linear_link.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@
7676

7777

7878
# %%
79+
from sklearn.metrics import mean_squared_error
80+
81+
7982
def fit_score_plot_regression(model, title=None):
8083
model.fit(data, target)
8184
target_predicted = model.predict(data)
@@ -95,7 +98,6 @@ def fit_score_plot_regression(model, title=None):
9598

9699
# %%
97100
from sklearn.linear_model import LinearRegression
98-
from sklearn.metrics import mean_squared_error
99101

100102
linear_regression = LinearRegression()
101103
linear_regression

0 commit comments

Comments
 (0)