| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Circuit.PCA.Diff
Description
Differentiable PCA operations.
The fitted PCAModel is treated as constant: this module differentiates
through the use of a PCA (centering, projection, reconstruction, loss),
not yet through the spectral fit itself.
Each operation is packaged as a Diff arrow, so it composes
with the rest of the circuits-ad stack.
Differentiable linear maps
scoresD :: PCAModel -> Diff' (Array Double) (Array Double) Source #
Differentiable scores: center, then project onto principal axes.
reconstructD :: PCAModel -> Diff' (Array Double) (Array Double) Source #
Differentiable reconstruction from scores.
projectRowsD :: PCAModel -> Diff' (Array Double) (Array Double) Source #
Full differentiable project-through-model: reconstruct . scores.