Transformations/Pipelines API Reference
Functions
ChemometricsTools.BoxCox
— Method.BoxCox(lambda)
Returns a BoxCox transform operator/function. To be used in a pipeline.
ChemometricsTools.Center
— Method.(T::Center)(Z; inverse = false)
Centers data in array Z
column-wise according to learned mean centers in Center object T
.
ChemometricsTools.Center
— Method.Center(Z)
Acquires the mean of each column in Z
provided and returns a transform that will subtract those column means from any future data.
ChemometricsTools.CenterScale
— Method.(T::CenterScale)(Z; inverse = false)
Centers and Scales data in array Z
column-wise according to learned measures of central tendancy in Scale object T
.
ChemometricsTools.CenterScale
— Method.CenterScale(Z)
This is a composition of Center and Scale (in that order).
ChemometricsTools.QuantileTrim
— Type.(T::QuantileTrim)(X, inverse = false)
Trims data in array X
columns wise according to learned quantiles in QuantileTrim object T
This function does NOT have an inverse.
ChemometricsTools.QuantileTrim
— Method.QuantileTrim(Z; quantiles::Tuple{Float64,Float64} = (0.05, 0.95) )
Trims values above or below the specified columnwise quantiles to the quantile values themselves.
ChemometricsTools.RangeNorm
— Method.(T::RangeNorm)(Z; inverse = false)
Scales and shifts data in array Z
column-wise according to learned min-maxes in RangeNorm object T
.
ChemometricsTools.RangeNorm
— Method.RangeNorm( Z )
Acquires the minimum and maximum of each column in Z
provided and returns a transform that performs the following operation (Z - min(X))/(max(X) - min(X)) on any future data. This has the important effect of scaling all values observed in the range of Z
to be between 0 and 1 with respect to each column.
ChemometricsTools.Scale
— Method.(T::Scale)(Z; inverse = false)
Scales data in array Z
column-wise according to learned standard deviations in Scale object T
.
ChemometricsTools.Scale
— Method.Scale(Z)
Acquires the standard deviation of each column in Z
provided and returns a transform that will divide those column-wise standard deviation from any future data.
ChemometricsTools.Logit
— Method.Logit(Z; inverse = false)
Logit transforms (ln( X / (1 - X) ))
) every element in Z
. The inverse may also be applied. Warning: This can return Infs and NaNs if elements of Z are not suited to the transform
ChemometricsTools.Pipeline
— Method.Pipeline( X, FnStack... )
Construct a pipeline object from vector/tuple of Transforms
. The Transforms vector are effectively a vector of functions which transform data.
ChemometricsTools.Pipeline
— Method.Pipeline(Transforms)
Constructs a transformation pipeline from vector/tuple of Transforms
. The Transforms vector are effectively a vector of functions which transform data.
ChemometricsTools.PipelineInPlace
— Method.PipelineInPlace( X, FnStack...)
Construct a pipeline object from vector/tuple of Transforms
. The Transforms vector are effectively a vector of functions which transform data. This function makes "inplace" changes to the Array X
as though it has been sent through the pipeline. This is more efficient if memory is a concern, but can irreversibly transform data in memory depending on the transforms in the pipeline.
ChemometricsTools.pipeline
— Method.(P::pipeline)(X; inverse = false)
Applies the stored transformations in a pipeline object P
to data in X. The inverse flag can allow for the transformations to be reversed provided they are invertible functions.