Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion notebooks/linear_models_ex_02.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"disease. This would depend on the patient's Body Mass Index which is defined\n",
"as `weight / height ** 2`.\n",
"\n",
"We load the dataset penguins dataset. We first use a set of 3 numerical\n",
"We load the penguins dataset. We first use a set of 3 numerical\n",
"features to predict the target, i.e. the body mass of the penguin."
]
},
Expand Down
2 changes: 1 addition & 1 deletion notebooks/linear_models_sol_02.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"disease. This would depend on the patient's Body Mass Index which is defined\n",
"as `weight / height ** 2`.\n",
"\n",
"We load the dataset penguins dataset. We first use a set of 3 numerical\n",
"We load the penguins dataset. We first use a set of 3 numerical\n",
"features to predict the target, i.e. the body mass of the penguin."
]
},
Expand Down
4 changes: 3 additions & 1 deletion notebooks/linear_regression_non_linear_link.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@
"metadata": {},
"outputs": [],
"source": [
"from sklearn.metrics import mean_squared_error\n",
"\n",
"\n",
"def fit_score_plot_regression(model, title=None):\n",
" model.fit(data, target)\n",
" target_predicted = model.predict(data)\n",
Expand Down Expand Up @@ -147,7 +150,6 @@
"outputs": [],
"source": [
"from sklearn.linear_model import LinearRegression\n",
"from sklearn.metrics import mean_squared_error\n",
"\n",
"linear_regression = LinearRegression()\n",
"linear_regression"
Expand Down
2 changes: 1 addition & 1 deletion python_scripts/linear_models_ex_02.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# disease. This would depend on the patient's Body Mass Index which is defined
# as `weight / height ** 2`.
#
# We load the dataset penguins dataset. We first use a set of 3 numerical
# We load the penguins dataset. We first use a set of 3 numerical
# features to predict the target, i.e. the body mass of the penguin.

# %% [markdown]
Expand Down
2 changes: 1 addition & 1 deletion python_scripts/linear_models_sol_02.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# disease. This would depend on the patient's Body Mass Index which is defined
# as `weight / height ** 2`.
#
# We load the dataset penguins dataset. We first use a set of 3 numerical
# We load the penguins dataset. We first use a set of 3 numerical
# features to predict the target, i.e. the body mass of the penguin.

# %% [markdown]
Expand Down
4 changes: 3 additions & 1 deletion python_scripts/linear_regression_non_linear_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@


# %%
from sklearn.metrics import mean_squared_error


def fit_score_plot_regression(model, title=None):
model.fit(data, target)
target_predicted = model.predict(data)
Expand All @@ -95,7 +98,6 @@ def fit_score_plot_regression(model, title=None):

# %%
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error

linear_regression = LinearRegression()
linear_regression
Expand Down