PCA as an NNModuleSpec #
The PCA spec model defines a projection y = (x - mean) · componentsᵀ.
This file provides the NNModuleSpec wrapper used for composition and export.
def
Spec.PCAModuleSpec
{α : Type}
[Context α]
{inDim outDim : ℕ}
(m : PCASpec α inDim outDim)
:
ModSpec.NNModuleSpec α (Shape.dim inDim Shape.scalar) (Shape.dim outDim Shape.scalar)
PCA module specification following NNModuleSpec.