yobx.sklearn.decomposition.fast_ica#

yobx.sklearn.decomposition.fast_ica.sklearn_fast_ica(g: GraphBuilderExtendedProtocol, sts: Dict, outputs: List[str], estimator: FastICA, X: str, name: str = 'fast_ica') str[source]#

Converts a sklearn.decomposition.FastICA into ONNX.

The transformation replicates sklearn.decomposition.FastICA.transform():

  • When whitening was applied during fitting (estimator.whiten is not False), the per-feature mean stored in mean_ is subtracted first.

  • The data (centred or raw) is then projected onto the independent components via a matrix multiplication with components_.T.

X  ──Sub(mean_)──►  centered  ──MatMul(components_.T)──►  output
     (only when whiten != False)

When whiten is False the Sub node is omitted and the unmixing matrix is applied directly to X.

Parameters:
  • g – the graph builder to add nodes to

  • sts – shapes defined by scikit-learn

  • estimator – a fitted FastICA

  • outputs – desired output names (independent components)

  • X – input tensor name

  • name – prefix name for the added nodes

Returns:

output tensor name