[ Web Proxy ]
URL:
Viewing: https://dataframes.bigquery.dev/reference/api/bigframes.ml.preprocessing.KBinsDiscretizer.html [Back]  [Original]

bigframes.ml.preprocessing.KBinsDiscretizer — bigframes documentation
Back to top
Search the docs ...:

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.

fit(X: DataFrame | Series | DataFrame | Series, y=None) KBinsDiscretizer[source]#

Fit the estimator.

Parameters:
Returns:

Fitted scaler.

Return type:

KBinsDiscretizer

transform(X: DataFrame | Series | DataFrame | Series) DataFrame[source]#

Discretize the data.

Parameters:

X (bigframes.dataframe.DataFrame or bigframes.series.Series or pandas.core.frame.DataFrame or pandas.core.series.Series) The DataFrame or Series to be transformed.

Returns:

Transformed result.

Return type:

bigframes.dataframe.DataFrame


Web Proxy Viewer  |  New URL  |  Original Page