bigframes.ml.preprocessing.KBinsDiscretizer#
- class bigframes.ml.preprocessing.KBinsDiscretizer(n_bins: int = 5, strategy: Literal['uniform', 'quantile'] = 'quantile')[source]#
Bin continuous data into intervals.
- Parameters:
n_bins (int, default 5) – The number of bins to produce. Raises ValueError if
n_bins < 2.strategy ({'uniform', 'quantile'}, default='quantile') – Strategy used to define the widths of the bins. ‘uniform’: All bins in each feature have identical widths. ‘quantile’: All bins in each feature have the same number of points.
Methods
__init__([n_bins, strategy])fit(X[, y])Fit the estimator.
fit_transform(X[, y])Fit to data, then transform it.
get_params([deep])Get parameters for this estimator.
to_gbq(model_name[, replace])Save the transformer as a BigQuery model.
transform(X)Discretize the data.