
Calculate interval summaries with a measure of central tendency of classification results
Source:R/interval.R
interval.RdCalculate interval summaries with a measure of central tendency of classification results
Usage
interval(
data,
metric = c("accuracy", "precision", "recall", "f1"),
by_set = TRUE,
type = c("sd", "se", "quantile"),
interval = NULL,
model_type = c("main", "null")
)
calculate_interval(
data,
metric = c("accuracy", "precision", "recall", "f1"),
by_set = TRUE,
type = c("sd", "se", "quantile"),
interval = NULL,
model_type = c("main", "null")
)Arguments
- data
listobject containing the classification outputs produce bytsfeature_classifier- metric
characterdenoting the classification performance metric to calculate intervals for. Can be one of"accuracy","precision","recall","f1". Defaults to"accuracy"- by_set
Booleanspecifying whether to compute intervals for each feature set. Defaults toTRUE. IfFALSE, the function will instead calculate intervals for each feature- type
characterdenoting whether to calculate a +/- SD interval with"sd", confidence interval based off the t-distribution with"se", or based on a quantile with"quantile". Defaults to"sd"- interval
numericscalar denoting the width of the interval to calculate. Defaults to1iftype = "sd"to produce a +/- 1 SD interval. Defaults to0.95iftype = "se"ortype = "quantile"for a 95 per cent interval- model_type
characterdenoting whether to calculate intervals for main models with"main"or null models with"null"if theuse_nullargument when usingtsfeature_classifierwasuse_null = TRUE. Defaults to"main"
Examples
library(theft)
features <- theft::calculate_features(theft::simData,
feature_set = NULL,
features = list("mean" = mean, "sd" = sd))
#> Running computations for user-supplied features...
classifiers <- classify(features,
by_set = FALSE,
n_resamples = 3)
#> Only one set of 'catch22', 'feasts', 'tsfeatures', or 'Kats' with potential duplicates is in your feature data. Exiting and returning original input data.
#> Generating resampled data...
#> Fitting model 1/6
#> Fitting model 2/6
#> Fitting model 3/6
#> Fitting model 4/6
#> Fitting model 5/6
#> Fitting model 6/6
interval(classifiers,
by_set = FALSE,
type = "sd",
interval = 1)
#> names .mean .lower .upper
#> 1 User_mean 0.1259259 0.1130959 0.1387559
#> 2 User_sd 0.5629630 0.5501330 0.5757930