dislib.preprocessing¶
-
class
dislib.preprocessing.
MinMaxScaler
(feature_range=(0, 1))[source]¶ Bases:
object
Standardize features by rescaling them to the provided range
Scaling happen independently on each feature by computing the relevant statistics on the samples in the training set. Minimum and Maximum values are then stored to be used on later data using the transform method.
Variables: feature_range (tuple) – The desired range of values in the ds-array. -
fit
(x)[source]¶ Compute the min and max values for later scaling.
Parameters: x (ds-array, shape=(n_samples, n_features)) Returns: self Return type: MinMaxScaler
-
-
class
dislib.preprocessing.
StandardScaler
[source]¶ Bases:
object
Standardize features by removing the mean and scaling to unit variance
Centering and scaling happen independently on each feature by computing the relevant statistics on the samples in the training set. Mean and standard deviation are then stored to be used on later data using the transform method.
Variables: - mean (ds-array, shape (1, n_features)) – The mean value for each feature in the training set.
- var (ds-array, shape (1, n_features)) – The variance for each feature in the training set.
-
fit
(x)[source]¶ Compute the mean and std to be used for later scaling.
Parameters: x (ds-array, shape=(n_samples, n_features)) Returns: self Return type: StandardScaler