PCA

class PCA(val x: DenseMatrix[Double], val covmat: DenseMatrix[Double])

Perform Principal Components Analysis on input data. Handles scaling of the when computing the covariance matrix. Lazily produces the scores (the translation of the data to their new coordinates on the PC axes.

Input is a matrix that has data points as rows. Variable naming and documentation inspired and used directy from the 'princomp' function in R.

class Object
trait Matchable
class Any

Value members

Concrete methods

def eigenvalues: DenseVector[Double]
def loadings: DenseMatrix[Double]

Concrete fields

lazy val center: DenseVector[Double]

The means of each column (axis) of the data.

The means of each column (axis) of the data.

val covmat: DenseMatrix[Double]
lazy val cumuvar: DenseVector[Double]

The cumulative proportion of variance explained by the first n principal components.

The cumulative proportion of variance explained by the first n principal components.

lazy val nobs: Int

The number of observations.

The number of observations.

lazy val propvar: DenseVector[Double]

The proportion of variance explained by each principal component.

The proportion of variance explained by each principal component.

lazy val scores: DenseMatrix[Double]

Translate the original data points to the PC axes.

Translate the original data points to the PC axes.

lazy val sdev: DenseVector[Double]

The standard deviations of the principal components.

The standard deviations of the principal components.

val x: DenseMatrix[Double]