scale: QTS Sample Centering and Standardization

View source: R/qts-sample-class.R

scaleR Documentation

QTS Sample Centering and Standardization

Description

QTS Sample Centering and Standardization

Usage

scale(x, center = TRUE, scale = TRUE, ...)

## Default S3 method:
scale(x, center = TRUE, scale = TRUE, ...)

## S3 method for class 'qts_sample'
scale(
  x,
  center = TRUE,
  scale = TRUE,
  by_row = FALSE,
  keep_summary_stats = FALSE,
  ...
)

Arguments

x

An object coercible into a numeric matrix or an object of class qts_sample representing a sample of observed QTS.

center

A boolean specifying whether to center the sample. If set to FALSE, the original sample is returned, meaning that no standardization is performed regardless of whether argument scale was set to TRUE or not. Defaults to TRUE.

scale

A boolean specifying whether to standardize the sample once it has been centered. Defaults to TRUE.

...

Extra arguments passed on to next methods.

by_row

A boolean specifying whether the QTS scaling should happen for each data point (by_row = TRUE) or for each time point (by_row = FALSE). Defaults to FALSE.

keep_summary_stats

A boolean specifying whether the mean and standard deviation used for standardizing the data should be stored in the output object. Defaults to FALSE in which case only the list of properly rescaled QTS is returned.

Value

A list of properly rescaled QTS stored as an object of class qts_sample when keep_summary_stats = FALSE. Otherwise a list with three components:

  • rescaled_sample: a list of properly rescaled QTS stored as an object of class qts_sample;

  • mean: a list of numeric vectors storing the corresponding quaternion Fréchet means;

  • sd: a numeric vector storing the corresponding quaternion Fréchet standard deviations.

Examples

x <- scale(vespa64$igp)
x[[1]]

astamm/squad documentation built on Jan. 26, 2024, 5:30 p.m.