skdownscale.pointwise_models.AnalogRegression

class skdownscale.pointwise_models.AnalogRegression(n_analogs=200, thresh=None, kdtree_kwargs=None, query_kwargs=None, logistic_kwargs=None, lr_kwargs=None)[source]
Parameters
n_analogs: int

Number of analogs to use when building linear regression

thresh: float or int

Threshold value. If provided, the model will predict: 1) the probability of this threshold being exceeded, and 2) the value given the threshold is exceeded

kdtree_kwargsdict

Keyword arguments to pass to the sklearn.neighbors.KDTree constructor

query_kwargsdict

Keyword arguments to pass to the sklearn.neighbors.KDTree.query method

lr_kwargsdict

Keyword arguments to pass to the sklear.linear_model.LinearRegression constructor

Notes

GARD models generates three columns in the predict function, the columns include pred, the mean prediction value; exceedance_prob, the probability of exceeding self.thresh value; and prediction_error, the RMSE associated with the mean prediction.

Attributes
kdtree_sklearn.neighbors.KDTree

KDTree object

Methods

fit(X, y)

Fit Analog model using a KDTree

get_params([deep])

Get parameters for this estimator.

predict(X)

Predict using the AnalogRegression model

score(X, y[, sample_weight])

Return the coefficient of determination of the prediction.

set_params(**params)

Set the parameters of this estimator.

__init__(n_analogs=200, thresh=None, kdtree_kwargs=None, query_kwargs=None, logistic_kwargs=None, lr_kwargs=None)[source]

Methods

__init__([n_analogs, thresh, kdtree_kwargs, ...])

fit(X, y)

Fit Analog model using a KDTree

get_params([deep])

Get parameters for this estimator.

predict(X)

Predict using the AnalogRegression model

score(X, y[, sample_weight])

Return the coefficient of determination of the prediction.

set_params(**params)

Set the parameters of this estimator.

Attributes

n_outputs

output_names