optimize_decay: Optimize Decay

Description Usage Arguments Details

View source: R/optimize_decay.R

Description

A function to calculate the weights for a decaying function.

Usage

1
optimize_decay(nrows, decay)

Arguments

nrows

An integer value defining the number of rows of the data set being analysed.

decay

A double value that is the exponent value of the decaying function.

Details

This function takes in the number of rows of a data set being analysed plus a decay factor which is just an exponent value, then the values of this vector are normalised to 1 so their weights total 1. (The higher the decay value, the more weighted to the closest values to the left of the vector become.)


niallbenj/footballstats documentation built on Aug. 13, 2019, 5:12 p.m.