Skip to content

Instantly share code, notes, and snippets.

@spikar
Created June 23, 2019 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spikar/0b707bb374c0820635e9b4ff584b5094 to your computer and use it in GitHub Desktop.
Save spikar/0b707bb374c0820635e9b4ff584b5094 to your computer and use it in GitHub Desktop.
# TODO: Import FastICA
from sklearn.decomposition import FastICA
# TODO: Initialize FastICA with n_components=3
ica = FastICA(n_components=3)
# TODO: Run the FastICA algorithm using fit_transform on dataset X
ica_result = ica.fit_transform(X)
ica_result.shape
result_signal_1 = ica_result[:,0]
result_signal_2 = ica_result[:,1]
result_signal_3 = ica_result[:,2]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment