Independent Component Analysis - psambit9791/jdsp GitHub Wiki
We apply the Independent Component Analysis to find underlying independent sources from observed mixtures of signals. There are certain assumptions underlying this method:
- the statistical independence of the source signals
- the observed signals being a linear combination of the source signals
- the sources of the signals are non-Gaussian
Fitting the Model
The source signals used here are three sinusoids:
- Source 1: $\sin(2\pi t)$
- Source 2: $\sin(12\pi t)$
- Source 3: $\sin(26\pi t)$
The observed signals are as follows:
- Observation 1: $\sin(2\pi t) + \sin(12\pi t) + \sin(26\pi t)$
- Observation 2: $0.5\sin(2\pi t) + 2\sin(12\pi t) + \sin(26\pi t)$
- Observation 3: $1.5\sin(2\pi t) + \sin(12\pi t) + 2\sin(26\pi t)$
Source ⇨ Observed
CODE
long seed = 32; //For random state initialisation weights
ICA obj = new ICA(observed, seed); //observed is double[][]
obj.fit();
double[][] recovered = obj.transform();
Observed ⇨ Recovered
Recovering from fitted ICA
CODE
double[][] recovered_unknown = obj.transform(unknown); //unknown is double[][]