openavmkit.projection
Time-series projection helpers.
Linear-trend extrapolation utilities used in time adjustment and trend analysis. Given an observed series of values, fits a linear model and returns the projected value at a target time index.
project_trend
project_trend(time_series, time_index)
Fits a linear trend of your observed time series values, then gives you the projected value at the specified time index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
time_series
|
ndarray
|
Time series values |
required |
time_index
|
int
|
The array index representing the time for which you want to predict a value for |
required |
Returns:
| Type | Description |
|---|---|
float
|
The predicted value at |
Source code in openavmkit/projection.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |