class PCA extends AnyRef
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.
- Alphabetic
- By Inheritance
- PCA
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new PCA(x: DenseMatrix[Double], covmat: DenseMatrix[Double])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
lazy val
center: DenseVector[Double]
The means of each column (axis) of the data.
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
- val covmat: DenseMatrix[Double]
-
lazy val
cumuvar: DenseVector[Double]
The cumulative proportion of variance explained by the first n principal components.
-
lazy val
eigenvalues: DenseVector[Double]
Do SVD on the covariance matrix.
Do SVD on the covariance matrix.
eigenvalues: The vector of eigenvalues, from ranked from left to right with respect to how much of the variance is explained by the respective component.
loadings: the matrix of variable loadings (i.e., a matrix whose rows contain the eigenvectors (note: in R, the eigenvectors are the columns)
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
lazy val
loadings: DenseMatrix[Double]
Do SVD on the covariance matrix.
Do SVD on the covariance matrix.
eigenvalues: The vector of eigenvalues, from ranked from left to right with respect to how much of the variance is explained by the respective component.
loadings: the matrix of variable loadings (i.e., a matrix whose rows contain the eigenvectors (note: in R, the eigenvectors are the columns)
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
lazy val
nobs: Int
The number of observations.
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
lazy val
propvar: DenseVector[Double]
The proportion of variance explained by each principal component.
-
lazy val
scores: DenseMatrix[Double]
Translate the original data points to the PC axes.
-
lazy val
sdev: DenseVector[Double]
The standard deviations of the principal components.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- val x: DenseMatrix[Double]