Skip to content

Commit

Permalink
Add comment on scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturoAmorQ committed Apr 29, 2024
1 parent 5868299 commit 5db388f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions python_scripts/cross_validation_grouping.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
# %% [markdown]
# We create a model consisting of a logistic regression classifier with a
# preprocessor to scale the data.
#
# ```{note}
# Here we use a `MinMaxScaler` as we know that each pixel's gray-scale is
# strictly bounded between 0 (white) and 16 (black). This makes `MinMaxScaler`
# more suited in this case than `StandardScaler`, as some pixels consistently
# have low variance (pixels at the borders might almost always be zero if most
# digits are centered in the image). Then, using `StandardScaler` can result in
# a very high scaled value due to division by a small number.
# ```

# %%
from sklearn.preprocessing import MinMaxScaler
Expand Down

0 comments on commit 5db388f

Please sign in to comment.