Skip to contents

these functions were obtained from https://rdrr.io/rforge/yasomi/ with some major modifications

Usage

# S3 method for default
somInitPca(data, somGrid, weights, with.princomp = FALSE, ...)

Arguments

data

The data to which the SOM will be fitted, a matrix or data frame of observations (which should be scaled)

somGrid

A somgrid object

weights

Optional weights for the data points

with.princomp

Switch specifying whether the princomp should be used instead of the prcomp for computing the principal components when no weights are given (see details)

...

not used

Value

A list containing: prototype, a matrix containing appropriate initial prototypes, and data.pca the results of the PCA conducted on the data