get_historical_analogs: Assumes that the forecast data and historical analogs are at...

Description Usage Arguments Value

View source: R/analogs.R

Description

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.

Usage

1
2
get_historical_analogs(f_test, h_train, h_real, n, weights,
  sigmas = FALSE)

Arguments

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.

Value

A list of the analogs, including observed value, the forecast along the matching window, and the distance metric.


kdayday/forecasting documentation built on Oct. 7, 2020, 7:16 p.m.