Skip to contents

Model construction

Functions that compute multivariate decompositions

pca()
Principal Components Analysis (PCA)
svd_wrapper()
Singular Value Decomposition (SVD) Wrapper
regress()
Multi-output linear regression
cPCAplus()
Contrastive PCA++ (cPCA++) Performs Contrastive PCA++ (cPCA++) to find directions that capture variation enriched in a "foreground" dataset relative to a "background" dataset. This implementation follows the cPCA++ approach which directly solves the generalized eigenvalue problem Rf v = lambda Rb v, where Rf and Rb are the covariance matrices of the foreground and background data, centered using the background mean.
geneig()
Generalized Eigenvalue Decomposition

Model classes for multivariate decompositions and extension

Generic S3 classes use to represented multivariate model fits

projector()
Construct a projector instance
bi_projector()
Construct a bi_projector instance
bi_projector_union()
A Union of Concatenated bi_projector Fits
discriminant_projector()
Construct a Discriminant Projector
cross_projector()
Two-way (cross) projection to latent components
multiblock_biprojector()
Create a Multiblock Bi-Projector
multiblock_projector()
Create a Multiblock Projector

Model Fitting and Projections

Functions for fitting models and applying projections.

project()
New sample projection
residualize()
Compute a regression model for each column in a matrix and return residual matrix
partial_project()
Partially project a new sample onto subspace
partial_projector()
Construct a partial projector
project_block()
Project a single "block" of data onto the subspace
project_vars()
Project one or more variables onto a subspace
transpose()
Transpose a model
reconstruct()
Reconstruct the data
inverse_projection()
Inverse of the Component Matrix
partial_inverse_projection()
Partial Inverse Projection of a Columnwise Subset of Component Matrix
compose_projector()
Compose Two Projectors
compose_partial_projector() `%>>%`
Compose Multiple Partial Projectors
refit()
refit a model
nystrom_approx()
Nyström approximation for kernel-based decomposition (Unified Version)
fit()
Fit a preprocessing pipeline
fit_transform()
Fit and transform data in one step
transform()
Transform data using a fitted preprocessing pipeline
inverse_transform()
Inverse transform data using a fitted preprocessing pipeline

Cross Projection

Functions for creating and working with cross_projectors for two-way projection between two sets of variables or features.

project(<cross_projector>)
project a cross_projector instance
coef(<cross_projector>)
Extract coefficients from a cross_projector object
reprocess(<cross_projector>)
reprocess a cross_projector instance
shape(<cross_projector>)
shape of a cross_projector instance
transfer()
Transfer data from one domain/block to another via a latent space
inverse_projection(<cross_projector>)
Default inverse_projection method for cross_projector
partial_inverse_projection(<cross_projector>)
Partial Inverse Projection of a Subset of the Loading Matrix in cross_projector
partial_project(<cross_projector>)
Partially project data for a cross_projector

Model Components and Properties

Functions for working with model components and properties.

components()
get the components
scores()
Retrieve the component scores
std_scores()
Compute standardized component scores
sdev()
standard deviations
ncomp()
Get the number of components
shape()
Shape of the Projector
is_orthogonal()
is it orthogonal
truncate()
truncate a component fit
block_lengths()
get block_lengths
block_indices()
get block_indices
nblocks()
get the number of blocks
prinang()
Calculate Principal Angles Between Subspaces
principal_angles()
Principal angles (two sub‑spaces)
variables_used()
Identify Original Variables Used by a Projector
vars_for_component()
Identify Original Variables for a Specific Component

Rotation and Transformation

Functions for rotating and transforming model components.

rotate()
Rotate a Component Solution
apply_rotation()
Apply rotation

Resampling and Confidence Intervals

Functions for bootstrapping and estimating confidence intervals.

bootstrap()
Bootstrap Resampling for Multivariate Models
bootstrap_pca()
Fast, Exact Bootstrap for PCA Results from pca function
perm_ci()
Permutation Confidence Intervals
perm_test perm_test.pca perm_test.cross_projector perm_test.discriminant_projector perm_test.multiblock_biprojector
Generic Permutation-Based Test
cv()
Cross-validation Framework
cv_generic()
Generic cross-validation engine

Classifier Construction

Functions for constructing classifiers.

classifier()
Construct a Classifier
classifier(<discriminant_projector>)
Create a k-NN classifier for a discriminant projector
classifier(<multiblock_biprojector>)
Multiblock Bi-Projector Classifier
classifier(<projector>)
create classifier from a projector
rf_classifier()
construct a random forest wrapper classifier
rf_classifier(<projector>)
Create a random forest classifier
predict(<classifier>)
Predict Class Labels using a Classifier Object
feature_importance()
Evaluate feature importance
feature_importance(<classifier>)
Evaluate Feature Importance for a Classifier

Model Diagnostics and Residuals

Functions for evaluating model fit and residuals.

residuals()
Obtain residuals of a component model fit
measure_reconstruction_error()
Compute reconstruction-based error metrics
measure_interblock_transfer_error()
Compute inter-block transfer error metrics for a cross_projector
pca_outliers()
PCA Outlier Diagnostics
rank_score()
Calculate Rank Score for Predictions
subspace_similarity()
Compute subspace similarity

Pre-processing

Functions for pre-processing data and managing pipelines.

center()
center a data matrix
pass()
a no-op pre-processing step
standardize()
center and scale each vector of a matrix
colscale()
scale a data matrix
prep()
prepare a dataset by applying a pre-processing pipeline
fresh()
Get a fresh pre-processing node cleared of any cached data
reprocess()
apply pre-processing parameters to a new data matrix
apply_transform()
apply a pre-processing transform
reverse_transform()
reverse a pre-processing transform
init_transform()
initialize a transform
concat_pre_processors()
bind together blockwise pre-processors
add_node()
add a pre-processing stage
preprocess()
Convenience function for preprocessing workflow
check_fitted()
Check if preprocessor is fitted and error if not
is_fitted()
Check if a preprocessing object is fitted
mark_fitted()
Enhanced fitted state tracking
get_fitted_state()
Get fitted state from attributes

Visualization

Functions for plotting and visualization.

biplot(<pca>)
Biplot for PCA Objects (Enhanced with ggrepel)
screeplot()
Screeplot for PCA
screeplot(<pca>)
Screeplot for PCA

Utilities

Utility functions.

group_means()
Compute column-wise mean in X for each factor level of Y
robust_inv_vTv()
Possibly use ridge-regularized inversion of crossprod(v)
topk()
top-k accuracy indicator
reconstruct_new()
Reconstruct new data in a model's subspace

Other

Other functions

print(<bi_projector>)
Pretty Print S3 Method for bi_projector Class
print(<classifier>)
Pretty Print Method for classifier Objects
print(<concat_pre_processor>)
Print a concat_pre_processor object
print(<multiblock_biprojector>)
Pretty Print Method for multiblock_biprojector Objects
print(<pca>)
Print Method for PCA Objects
print(<perm_test>)
Print Method for perm_test Objects
print(<perm_test_pca>)
Print Method for perm_test_pca Objects
print(<pre_processor>)
Print a pre_processor object
print(<prepper>)
Print a prepper pipeline
print(<regress>)
Pretty Print Method for regress Objects
print(<rf_classifier>)
Pretty Print Method for rf_classifier Objects
summary(<composed_projector>)
Summarize a Composed Projector
coef(<composed_projector>)
Get Coefficients of a Composed Projector
coef(<cross_projector>)
Extract coefficients from a cross_projector object
coef(<multiblock_projector>)
Coefficients for a Multiblock Projector
predict(<classifier>)
Predict Class Labels using a Classifier Object
predict(<discriminant_projector>)
Predict method for a discriminant_projector, supporting LDA or Euclid
predict(<rf_classifier>)
Predict Class Labels using a Random Forest Classifier Object
reprocess()
apply pre-processing parameters to a new data matrix
reprocess(<cross_projector>)
reprocess a cross_projector instance
reprocess(<nystrom_approx>)
Reprocess data for Nyström approximation
project()
New sample projection
project(<cross_projector>)
project a cross_projector instance
project(<nystrom_approx>)
Project new data using a Nyström approximation model
project_block()
Project a single "block" of data onto the subspace
project_block(<multiblock_projector>)
Project Data onto a Specific Block
project_vars()
Project one or more variables onto a subspace
projector()
Construct a projector instance
truncate()
truncate a component fit
truncate(<composed_projector>)
Truncate a Composed Projector
block_indices()
get block_indices
block_indices(<multiblock_projector>)
Extract the Block Indices from a Multiblock Projector
inverse_projection()
Inverse of the Component Matrix
inverse_projection(<composed_projector>)
Compute the Inverse Projection for a Composed Projector
inverse_projection(<cross_projector>)
Default inverse_projection method for cross_projector
partial_inverse_projection()
Partial Inverse Projection of a Columnwise Subset of Component Matrix
partial_inverse_projection(<cross_projector>)
Partial Inverse Projection of a Subset of the Loading Matrix in cross_projector
partial_inverse_projection(<regress>)
Partial Inverse Projection for a regress Object
partial_project()
Partially project a new sample onto subspace
partial_project(<composed_partial_projector>)
Partial Project Through a Composed Partial Projector
partial_project(<cross_projector>)
Partially project data for a cross_projector
partial_projector()
Construct a partial projector
reconstruct()
Reconstruct the data
reconstruct(<composed_projector>)
Reconstruct Data from Scores using a Composed Projector
reconstruct(<pca>)
Reconstruct Data from PCA Results
reconstruct_new()
Reconstruct new data in a model's subspace
rotate()
Rotate a Component Solution
rotate(<pca>)
Rotate PCA Loadings
std_scores()
Compute standardized component scores
std_scores(<svd>)
Calculate Standardized Scores for SVD results
is_orthogonal()
is it orthogonal
is_orthogonal(<projector>)
Stricter check for true orthogonality
add_node()
add a pre-processing stage
add_node(<prepper>)
Add a pre-processing node to a pipeline
shape()
Shape of the Projector
shape(<cross_projector>)
shape of a cross_projector instance
transfer()
Transfer data from one domain/block to another via a latent space
transfer(<cross_projector>)
Transfer from X domain to Y domain (or vice versa) in a cross_projector