get_transition_info: Invoke the Transition Pairing Method

View source: R/get_transition_info.R

get_transition_infoR Documentation

Invoke the Transition Pairing Method

Description

Invoke the Transition Pairing Method

Usage

get_transition_info(predictions, references, window_size = 1, ...)

validate_transition_info_input(predictions, references)

impute_trans(x, out_length)

recode_trans_names(x)

Arguments

predictions

A dummy-coded vector of predicted transitions (1) interspersed with non-transitions (0). Logical vectors are coerced to numeric.

references

A dummy-coded vector of actual (i.e., reference) transitions (1) interspersed with non-transitions (0). Logical vectors are coerced to numeric.

window_size

The maximum number of indices that are allowed to separate a predicted and reference transition, before the two are considered incompatible

...

additional arguments passed to or from methods, not currently used

Value

an object of class transition that contains necessary information for evaluating the effectiveness of the predictions.

Note

If the lengths of predictions and references differ, a warning is issued, and the shorter vector will be expanded to match the length of the longer, using the original relative/proportional positions of the transitions to determine where they should be placed in the expanded vector. The relative position could be determined different ways, each having unique implications for how well aligned predictions and references are. Therefore, while this function is not unusable when the lengths differ, you should make sure you know what you're doing if you want to use it that way. The safest solution is to expand the shorter vector yourself.

See Also

summary.transition

Examples

set.seed(100)
predictions <- (sample(1:100)%%2)
references  <- (sample(1:100)%%2)
window_size <- 7
if (isTRUE(requireNamespace("matchingMarkets", quietly = TRUE))) {
  get_transition_info(predictions, references, window_size)
}

PAutilities documentation built on Aug. 21, 2022, 9:05 a.m.