neuroglia.trace.
Binarizer
(threshold=0.0, copy=True)[source]¶Binarize data (set feature values to 0 or 1) according to a threshold
This transformer is a DataFram-friendly alternative to sklearn.preprocessing.Binarizer
Values greater than the threshold map to 1, while values less than or equal to the threshold map to 0. With the default threshold of 0, only positive values map to 1.
Parameters: |
|
---|
Notes
This estimator is stateless (besides constructor parameters), the fit method does nothing but is useful when used in a pipeline.
__init__
(threshold=0.0, copy=True)[source]¶x.__init__(…) initializes x; see help(type(x)) for signature
Methods
__init__ ([threshold, copy]) |
x.__init__(…) initializes x; see help(type(x)) for signature |
fit (X[, y]) |
Do nothing and return the estimator unchanged |
fit_transform (X[, y]) |
Fit to data, then transform it. |
get_params ([deep]) |
Get parameters for this estimator. |
set_params (**params) |
Set the parameters of this estimator. |
transform (X) |
Binarize each element of X |