unitWeightModel: Unit-weight linear model

Description Usage Arguments Value References See Also

View source: R/heuristics.R

Description

Unit-weight linear model inspired by Robyn Dawes. Unit Weight Model assigns unit (+1 or -1) weights based on cueValidity.

This version differs from others in that it uses a weight of 0 if cue validity is 0.5 (rather than randomly assigning +1 or -1) to give faster convergence of average accuracy.

Usage

1
2
3
4
5
6
7
unitWeightModel(
  train_data,
  criterion_col,
  cols_to_fit,
  reverse_cues = TRUE,
  fit_name = "unitWeightModel"
)

Arguments

train_data

Training/fitting data as a matrix or data.frame.

criterion_col

The index of the column in train_data that has the criterion.

cols_to_fit

A vector of column indices in train_data, used to fit the criterion.

reverse_cues

Optional parameter to reverse cues as needed.

fit_name

Optional The name other functions can use to label output. It defaults to the class name.

Value

An object of class unitWeightModel. This is a list containing at least the following components:

References

Wikipedia's entry on https://en.wikipedia.org/wiki/Unit-weighted_regression.

See Also

cueValidity for the metric used to to determine cue direction.

predictPair for predicting whether row1 is greater.

predictPairProb for predicting the probability row1 is greater.


heuristica documentation built on Sept. 8, 2021, 9:08 a.m.