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_componentsparameters determines the number of components ICA uses. - The
n_componentsparameter is optional. - The
n_componentsparameter default isNone. IfNoneis selected, all components are used. - Use the
algorithmparameter to applyparallelordeflationalgorithm for FastICA. - The the
algorithmparameter default isalgorithm='parallel'. - Use the
whitenparameter to set a noise term. - The
whitenparameter is optional. - If the
whitenparameter isFalseno whitening is performed. - The
whitenparameter default isTrue. - The
max_iterparameter determines the maximum number of iterations during the running of thefitcommand. - The
max_iterparameter is optional. - The
max_iterparameter default is 200. - The
funparameter determines the functional form of the G function used in the approximation to neg-entropy. - The
funparameter is optional. - The
funparameter default islogcosh. Other options for this parameter areexporcube. - The
tolparameter sets the tolerance on update at each iteration. - The
tolparameter is optional. - The
tolparameter default is 0.0001 . - The
random_stateparameter sets the seed value used by the random number generator. - The
random_stateparameter default isNone. - If
random_state=Nonethen 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 pathSplunk_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).