Metrics are functions that tell how much information would be
lost for a given reduction in the data. reduce. as_measure()
is a
helper function to create new metrics to be used in partitioner
s.
partitioner
s can be created with as_partitioner()
.
as_measure(.f, ...)
a function to use in as_partitioner()
Other metrics:
measure_icc()
,
measure_min_icc()
,
measure_min_r2()
,
measure_std_mutualinfo()
,
measure_variance_explained()
Other metrics:
measure_icc()
,
measure_min_icc()
,
measure_min_r2()
,
measure_std_mutualinfo()
,
measure_variance_explained()
inter_item_reliability <- function(mat) {
corrs <- corr(mat)
corrs[lower.tri(corrs, diag = TRUE)] <- NA
corrs %>%
colMeans(na.rm = TRUE) %>%
mean(na.rm = TRUE)
}
measure_iir <- as_measure(inter_item_reliability)
measure_iir
#> function (.partition_step, ...)
#> {
#> if (.partition_step$all_done) {
#> return(.partition_step)
#> }
#> composite_variables <- pull_composite_variables(.partition_step)
#> target_data <- .partition_step$.df[, composite_variables,
#> drop = FALSE]
#> .partition_step$metric <- .f(target_data, ...)
#> .partition_step
#> }
#> <bytecode: 0x555a64b11fd0>
#> <environment: 0x555a64b11278>