skdownscale.pointwise_models.BcsdPrecipitation

class skdownscale.pointwise_models.BcsdPrecipitation(time_grouper=<function MONTH_GROUPER>, climate_trend_grouper=<function DAY_GROUPER>, climate_trend=<function MONTH_GROUPER>, return_anoms=True, qm_kwargs=None)[source]

Bases: BcsdBase

Classic BCSD model for Precipitation

Parameters:
  • time_grouper (str or pd.Grouper, optional) – Pandas time frequency str or Grouper object. Specifies how to group time periods. Default is ‘M’ (e.g. Monthly).

  • qm_kwargs (dict) – Keyword arguments to pass to QuantileMapper.

time_grouper

Linear Regression object.

Type:

pd.Grouper

quantile_mappers_

QuantileMapper objects (one for each time group).

Type:

dict

__init__(time_grouper=<function MONTH_GROUPER>, climate_trend_grouper=<function DAY_GROUPER>, climate_trend=<function MONTH_GROUPER>, return_anoms=True, qm_kwargs=None)

Methods

__init__([time_grouper, ...])

fit(X, y)

Fit BcsdPrecipitation model

get_metadata_routing()

Get metadata routing of this object.

get_params([deep])

Get parameters for this estimator.

predict(X)

Predict using the BcsdPrecipitation model

set_params(**params)

Set the parameters of this estimator.

fit(X, y)[source]

Fit BcsdPrecipitation model

Parameters:
  • X (pd.Series or pd.DataFrame, shape (n_samples, 1)) – Training data

  • y (pd.Series or pd.DataFrame, shape (n_samples, 1)) – Target values.

Returns:

self (returns an instance of self.)

predict(X)[source]

Predict using the BcsdPrecipitation model

Parameters:

X (pd.Series or pd.DataFrame, shape (n_samples, 1)) – Samples.

Returns:

C (pd.DataFrame, shape (n_samples, 1)) – Returns predicted values.