pyPhenology.models.Linear¶
-
class
pyPhenology.models.
Linear
(parameters={})[source]¶ Linear Regression Model
A 2 parameter regression model with \(DOY\) as the response variable.
\[DOY = \beta_{1} + \beta_{2}T_{mean}\]where \(T_{mean}\) is the mean temperature of the time period specified. By default it is set to model spring phenology (with mean temperature of Jan. 1 - March 31). This can also be used for fall phenology by setting the time parameters to the late summer/fall season.
- Parameters:
- intercept : int | float
- \(\beta_{1}\), intercept of the modeldefault : (-67,298)
- slope : int | float
- \(\beta_{1}\), Slope of the modeldefault : (-25,25)
- time_start : int
- Start doy for the season of interestdefault : 1 (Jan 1)
- time_length : int
- The length of the season in daysdefault : 90
Methods
__init__
([parameters])Initialize self. fit
(observations, predictors[, …])Estimate the parameters of a model get_params
()Get the fitted parameters predict
([to_predict, predictors])Make predictions save_params
(filename[, overwrite])Save the parameters for a model score
([metric, doy_observed, to_predict, …])Evaluate a prediction given observed doy values