Description Usage Arguments Value
Assumes that the forecast data and historical analogs are at the same time-resolution To calculate standard deviation of each feature, zero values are skipped.
1 2 | get_historical_analogs(f_test, h_train, h_real, n, weights,
sigmas = FALSE)
|
f_test |
matrix of the forecast data to fit on [time along matching window x physical feature] |
h_train |
array of historical forecast data [potential analog time x time along matching window x physical feature]. Matching window time can be a singleton dimension |
h_real |
Historical realized value of interest, e.g., power (equivalent to a kNN classification) |
n |
Integer, number of historical analogs to pick |
weights |
Vector of weights to use for each feature |
sigmas |
(optional) Vector of standard deviations to use for each feature. Can be re-calculated if feature has redundancies to make matrix structure. |
A list of the analogs, including observed value, the forecast along the matching window, and the distance metric.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.