feature_distance: Calculate the distance metric for one physical feature for a...

Description Usage Arguments Value

View source: R/analogs.R

Description

Calculate the distance metric for one physical feature for a potential analog Raw distance is 0 if BOTH forecast and historical are missing to accommodate windows that overlap sunrise/set. Distance is still NA if only one is missing. Matrix slicing is done internally to handle half_interval of 0 or matrix of single feature (to avoid vectors)

Usage

1
feature_distance(weight, sigma, f, h)

Arguments

weight

weight [0,1] assigned to this feature

sigma

Standard deviation of the feature over the historical record

f

A vector forecast of one features

h

An potential analog forecast of one feature

Value

feature distance


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