View source: R/boxplot-classify.R
| classify | R Documentation |
Aligns new functions to the template of the fit behind an amplitude or
phase boxplot (see align_new()) and compares their distance to the median
with the boxplot regions: the 50% central region, the (1-\alpha)
central region, within the whiskers, or outlier.
classify(x, ...)
## S3 method for class 'ampbox'
classify(x, f_new, ...)
## S3 method for class 'phbox'
classify(x, f_new, ...)
x |
An object of class |
... |
Unused here. |
f_new |
A numeric matrix of shape |
For an ampbox, the distance is the amplitude (SRVF) distance of the
aligned function to the median SRVF; for a phbox, it is the phase distance
of its warping function to the median warping function.
A list with components (one entry or column per function):
dist: distance to the median;
level: 1 = 50% central region, 2 = (1-\alpha) central region,
3 = within whiskers, 4 = outlier;
region: level as text;
side: "Q1" or "Q3", the quartile direction the function lies in;
fn, qn, gam: the aligned functions, SRVFs and warping functions.
## Not run:
out <- time_warping(simu_data$f, simu_data$time, centroid_type = "median")
amp <- boxplot(out, variability_type = "amplitude", what = "stats")
classify(amp, simu_data$f[, 1:3])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.