Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scikit-learn
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ian Johnson
scikit-learn
Commits
485854a9
Commit
485854a9
authored
12 years ago
by
Andreas Mueller
Browse files
Options
Downloads
Patches
Plain Diff
DOC added missing docstrings
parent
cf4940a5
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sklearn/preprocessing.py
+16
-1
16 additions, 1 deletion
sklearn/preprocessing.py
with
16 additions
and
1 deletion
sklearn/preprocessing.py
+
16
−
1
View file @
485854a9
...
...
@@ -175,6 +175,14 @@ class MinMaxScaler(BaseEstimator, TransformerMixin):
self
.
copy
=
copy
def
fit
(
self
,
X
,
y
=
None
):
"""
Compute the minimum and maximum to be used for later scaling.
Parameters
----------
X : array-like, shape [n_samples, n_features]
The data used to compute the per-feature minimum and maximum
used for later scaling along the features axis.
"""
X
=
check_arrays
(
X
,
sparse_format
=
"
dense
"
,
copy
=
self
.
copy
)[
0
]
feature_range
=
self
.
feature_range
if
feature_range
[
0
]
>=
feature_range
[
1
]:
...
...
@@ -187,6 +195,13 @@ class MinMaxScaler(BaseEstimator, TransformerMixin):
return
self
def
transform
(
self
,
X
):
"""
Scaling features of X according to feature_range.
Parameters
----------
X : array-like with shape [n_samples, n_features]
Input data that will be transformed.
"""
X
=
check_arrays
(
X
,
sparse_format
=
"
dense
"
,
copy
=
self
.
copy
)[
0
]
X
*=
self
.
scale_
X
+=
self
.
min_
...
...
@@ -251,7 +266,7 @@ class StandardScaler(BaseEstimator, TransformerMixin):
self
.
copy
=
copy
def
fit
(
self
,
X
,
y
=
None
):
"""
Compute the mean and std to be used for later scaling
"""
Compute the mean and std to be used for later scaling
.
Parameters
----------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment