Algorithms

ICA

ICA (Independent component analysis) separates a multivariate signal into additive sub-components that are maximally independent. Typically, ICA is not used for separating superimposed signals, but for reducing dimensionality. The ICA mo…

ICA (Independent component analysis) separates a multivariate signal into additive sub-components that are maximally independent. Typically, ICA is not used for separating superimposed signals, but for reducing dimensionality. The ICA model does not include a noise term for the model to be correct, meaning whitening must be applied. Whitening can be done internally using the whiten argument, or manually using one of the PCA variants.

Parameters

  • The n_components parameters determines the number of components ICA uses.
  • The n_components parameter is optional.
  • The n_components parameter default is None. If None is selected, all components are used.
  • Use the algorithm parameter to apply parallel or deflation algorithm for FastICA.
  • The the algorithm parameter default is algorithm='parallel'.
  • Use the whiten parameter to set a noise term.
  • The whiten parameter is optional.
  • If the whiten parameter is False no whitening is performed.
  • The whiten parameter default is True.
  • The max_iter parameter determines the maximum number of iterations during the running of the fit command.
  • The max_iter parameter is optional.
  • The max_iter parameter default is 200.
  • The fun parameter determines the functional form of the G function used in the approximation to neg-entropy.
  • The fun parameter is optional.
  • The fun parameter default is logcosh. Other options for this parameter are exp or cube.
  • The tol parameter sets the tolerance on update at each iteration.
  • The tol parameter is optional.
  • The tol parameter default is 0.0001 .
  • The random_state parameter sets the seed value used by the random number generator.
  • The random_state parameter default is None.
  • If random_state=None then a random seed value is used.

Syntax

fit ICA n_components=<int>, algorithm=<"parallel"|"deflation">, whiten=<bool>, fun=<"logcosh"|"exp"|"cube">, max_iter=<int>, tol=<float>, random_state=<int> <explanatory_fields> [into <model name>]

You can save ICA models using the into keyword and apply new data later using the apply command.

Syntax constraints

You cannot inspect the model learned by ICA with the summary command.

Example

The following example shows how ICA is able to find the two original sources of data from two measurements that have mixes of both. As a comparison, PCA is used to show the difference between the two – PCA is not able to identify the original sources.

| makeresults count=2
| streamstats count as count
| eval time=case(count=2,relative_time(now(),"+2d"),count=1,now())
| makecontinuous time span=15m
| eval _time=time
| eval s1 = sin(2*time)
| eval s2 = sin(4*time)
| eval m1 = 1.5*s1 + .5*s2, m2 = .1*s1 + s2
| fit ICA m1, m2 n_components=2 as IC
| fit PCA m1, m2 k=2 as PC
| fields _time, *
| fields - count, time

Local availability Permalink to this section

  • Local class: ICA
  • Source file: Splunk_ML_Toolkit/bin/algos/ICA.py (in-repo path Splunk_ML_Toolkit/bin/algos/ICA.py)
  • algos.conf stanza: [ICA]
  • Class bases: TransformerMixin, BaseAlgo

Source Permalink to this section

Adapted from the Splunk AI Toolkit 5.6.4 documentation at /en/splunk-cloud-platform/apply-machine-learning/use-ai-toolkit/5.6.4/algorithms-and-scoring-metrics-in-the-ai-toolkit/algorithms-in-the-ai-toolkit (section: preprocessor).

Press Cmd/Ctrl+K to focus search. Esc to close.

Type to search the portal.