| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
DataFrame.PCA
Description
Principal component analysis via the symmetric Jacobi eigensolver on the
covariance of the (optionally standardized) feature columns. fit trains a
PCAModel (components + explained variance); the projection is exposed as
pcaExprs / pcaTransform (PCA is a transformer, so it has no Predict).
Synopsis
- module DataFrame.Model
- data NComponents
- = NComp !Int
- | VarianceCovered !Double
- data PCAConfig = PCAConfig {}
- defaultPCAConfig :: PCAConfig
- data PCAModel = PCAModel {
- pcaComponents :: !(Vector (Vector Double))
- pcaExplainedVariance :: !(Vector Double)
- pcaExplainedVarianceRatio :: !(Vector Double)
- pcaMean :: !(Vector Double)
- pcaScale :: !(Maybe (Vector Double))
- pcaFeatureNames :: !(Vector Text)
- pcaExprs :: PCAModel -> [(Text, Expr Double)]
- pcaTransform :: PCAModel -> Transform
Documentation
module DataFrame.Model
data NComponents Source #
How many components to keep.
Constructors
| NComp !Int | |
| VarianceCovered !Double |
Instances
| Show NComponents Source # | |
Defined in DataFrame.PCA Methods showsPrec :: Int -> NComponents -> ShowS # show :: NComponents -> String # showList :: [NComponents] -> ShowS # | |
| Eq NComponents Source # | |
Defined in DataFrame.PCA | |
Constructors
| PCAConfig | |
Fields
| |
Instances
A fitted PCA. pcaComponents are sklearn's components_ (row i is the
i-th loading vector); pcaScale is Just the per-column std when
standardizing.
Constructors
| PCAModel | |
Fields
| |