sp_class_perform.Rd
Compare spectra of each pair of indicated groups at each wavelength.
sp_class_perform(
sp,
by = stop("Parameter 'by' is missing."),
measure = c("auc", "bac", "j", "sesp", "tpr")
)
sp_class_perform_cv(
sp,
by = stop("Parameter 'by' is not specified."),
measure = c("sesp", "j", "tpr")[1],
cvo = cvo_create_folds(sp, by, seeds),
seeds = NULL,
sp_test = NULL
)
print.sp_class_perform_cv(obj)
print.sp_classif_performance(obj)
# S3 method for sp_classif_performance
predict(object, newdata, what = c("values", "performance"), ...)
sp_classification_performance(
sp,
by = stop("Parameter 'by' is not specified."),
measure = c("sesp", "j", "tpr")[1],
cvo = cvo_create_folds(sp, by, seeds),
seeds = NULL,
...
)
sp_compare_gr_wl(
sp,
by = stop("Parameter 'by' is missing."),
measure = c("auc", "j", "sesp", "tpr"),
...
)
class_perform_sp(
sp,
by = stop("Parameter 'by' is missing."),
measure = c("auc", "j", "sesp", "tpr"),
...
)
hyperSpec
object.
A vector (factor variable) with indicated groups for each case:
either variable name inside the object sp
, or a vector
of length nrow(sp)
.
string with measure of classification performance. Currently
available options:
"auc" - AUC (default) area under the ROC curve;
"j" - Youden's index;
"bac" - Balanced accuracy (mean of Sensitivity (Se) and Specificity (Sp)).
"sesp" - [DEPRECATED!] The same as "bac";
"tpr" - [DEPRECATED!] The same as "bac";
"kappa" - [SLOW, DO NOT USE IT] Cohen's kappa.
a cross-validation object (cvo), created with function
cvo_create_folds
,createFolds
or similar.
Fields of sp_classif_performance
object:
type type of data used ("Training data");
performance - hyperSepc
object with performance estimates;
cutoffs - hyperSepc
object with estimates of critical values
(cut-off points);
means - hyperSepc
object with means of each compared group;
means.description - type of those means
("10% trimmed mean (of each group)");
compared_by_var - variable name, that was used for grouping;
measure- measure of performance.
Fields of sp_class_perform_cv
object:
data - a hyperSpec
object with data used in calculations;
cvo - cross-validation object used for analysis;
train_performance - performance estimates of training datasets for each repetition and fold;
test_performance - performance estimates of testing datasets for each repetition and fold;
cutoffs - estimates of cut-off values for each repetition and fold;
obj - a list of sp_classif_performance
objects for each repetition and fold;
Other spHelper functions for spectroscopy and hyperSpec:
IQR_outliers()
,
binning()
,
file
,
gapDer()
,
hy2mat()
,
hyAdd_Label_wl()
,
hyAdd_Labels_PAP_PD_2014()
,
hyAdd_Labels_TD2009()
,
hyAdd()
,
hyDrop_NA()
,
hyGet_palette()
,
hyRm_palette()
,
mad_outliers()
,
mean_Nsd()
,
median_Nmad()
,
plot_hyPalette()
,
prepare_PAP_RK_2014__MATLAB_failui()
,
read.OOIBase32()
,
read.OceanView.header()
,
read.OceanView()
,
read.sp.csv2()
,
read3csv2hy()
,
replace_spc()
,
sd_outliers()
,
spStat()