Barebones definition of a DimReduction class.
DimReduction.RdRepresents a latent space output of a matrix after a transformation function, with any required information to reproject other inputs using this object.
Child classes should implement a project method to allow for the projection of other matrices using
the fitted transformation object.
Details
project(): Perform a dimensionality reduction on a matrix using a pre-fit DimReduction object.
DimReduction subclasses should use the project method on new data with the same features, to project into the same latent space.
All required information to run a projection should be held in x$fitted_params, including pertinent parameters when constructing the DimReduction subclass object.
If there are no rownames, assume that the matrix is in the same order as the original matrix, assuming that they have the same number of features. If there are rownames, reorder the matrix to match the order of the original matrix
Fields
fitted_params(list) A list of parameters used for the transformation of a matrix. This should include all necessary information to project new data with the same features.
feature_names(character) The names of the features that this DimReduction object was fit on. Matrices to be projected should have the same feature names.