S4 Class implementing PCA with L1 error.
Details
PCA transforms the data so that the L2 reconstruction error is minimized or the variance of the projected data is maximized. This is sensitive to outliers, L1 PCA minimizes the L1 reconstruction error or maximizes the sum of the L1 norm of the projected observations.
Slots
fun
A function that does the embedding and returns a dimRedResult object.
stdpars
The standard parameters for the function.
General usage
Dimensionality reduction methods are S4 Classes that either be used
directly, in which case they have to be initialized and a full
list with parameters has to be handed to the @fun()
slot, or the method name be passed to the embed function and
parameters can be given to the ...
, in which case
missing parameters will be replaced by the ones in the
@stdpars
.
Parameters
PCA can take the following parameters:
- ndim
The number of output dimensions.
- center
logical, should the data be centered, defaults to
TRUE
.- scale.
logical, should the data be scaled, defaults to
FALSE
.- fun
character or function, the method to apply, see the
pcaL1
package- ...
other parameters for
fun
Implementation
Wraps around the different methods is the pcaL1
package. Because PCA
can be reduced to a simple rotation, forward and backward projection
functions are supplied.
References
Park, Y.W., Klabjan, D., 2016. Iteratively Reweighted Least Squares Algorithms for L1-Norm Principal Component Analysis, in: Data Mining (ICDM), 2016 IEEE 16th International Conference On. IEEE, pp. 430-438.
See also
Other dimensionality reduction methods:
AutoEncoder-class
,
DRR-class
,
DiffusionMaps-class
,
DrL-class
,
FastICA-class
,
FruchtermanReingold-class
,
HLLE-class
,
Isomap-class
,
KamadaKawai-class
,
MDS-class
,
NNMF-class
,
PCA-class
,
UMAP-class
,
dimRedMethod-class
,
dimRedMethodList()
,
kPCA-class
,
nMDS-class
,
tSNE-class
Examples
if(requireNamespace("pcaL1", quietly = TRUE)) {
dat <- loadDataSet("Iris")
emb <- embed(dat, "PCA_L1")
plot(emb, type = "2vars")
plot(inverse(emb, getData(getDimRedData((emb)))), type = "3vars")
}