model_point_process

model_point_process(
    data,
    threshold=None,
    total_years=None,
    use_defaults=True,
    seasonal=False,
    time_block='water_year',
    start_month=10,
    parameters=None,
    parameter_values=None,
    use_default_flat_priors=None,
)

A point process over exceedances of a threshold.

Combines an arrival rate with a magnitude distribution.

With seasonal=True the magnitude distribution becomes TWO generalized extreme value marginals with two fitted change points, and each observation is assigned to a season by its day of the year – so the data must carry DATES, not bare indices::

data = analysis_data(exact={"date": dates, "value": peaks})
model = model_point_process(data, seasonal=True)

Observations supplied with integer indices are treated as January 1 of that year, which puts every one of them in the same season.

Parameters

Name Type Description Default
data AnalysisData or array_like Observations. required
threshold float Exceedance threshold; derived from the data when omitted. See :func:~corehydropy.data.threshold_diagnostics for choosing one. None
total_years float Record length in years, used for the arrival rate. None
use_defaults bool Let the model derive its threshold and record length from the data. Applied before an explicit threshold or total_years, so an explicit value wins. True
seasonal bool Fit two seasonal magnitude distributions with fitted change points. False
time_block str The block a seasonal model reduces the record over: "water_year", "calendar_year", "custom_year", "quarter" or "month". "water_year"
start_month int The month a water year or custom year begins. 10
parameters As in :func:model_univariate. None
parameter_values As in :func:model_univariate. None
use_default_flat_priors As in :func:model_univariate. None

Returns

Name Type Description
Model The assembled model spec.