current_miss_linear: Error Function

View source: R/current_miss.R

current_miss_linearR Documentation

Error Function

Description

Returns the error between the current calculated weighted proportions and the target proportions. Method of calculation depends on the error function used. These are private function which is not intended for end-user use.

Usage

current_miss_linear(truth, current)

current_miss_squared(truth, current)

current_miss_mean(truth, current)

current_miss_max(truth, current)

current_miss_max_squared(truth, current)

current_miss_mean_squared(truth, current)

Arguments

truth

A vector containing the true proportions of the target variable

current

A vector containing the weighted proportions of the target variable based on the current weights.

Details

If supplying a custom error function closure to harvest, the function should take two arguments: first, the target proportions, and second the current weighted proportions based on the current provisional weights.

Error functions:

current_miss_linear

Sum of absolute differences

current_miss_squared

Sum of squared differences

current_miss_max

Maximum absolute difference

current_miss_mean

Mean absolute difference

current_miss_max_squared

Maximum squared difference

current_miss_mean_squared

Mean squared difference

Value

The calculated error, a single scalar greater than 0.


aaronrudkin/autumn documentation built on Feb. 5, 2024, 6:08 p.m.