<jupyter_start><jupyter_text>ICA - independent component analysis<jupyter_code>import numpy as np
from sklearn.decomposition import FastICA
data = np.array([
    [1, 2, 1],
    [2, 3, 1],
    [3, 5, 1],
    [2, 2, 1]
])
ica = FastICA(n_components=2)
projection = ica.fit_transform(data)
projection<jupyter_output>/opt/anaconda3/lib/python3.7/site-packages/sklearn/decomposition/_fastica.py:481: RuntimeWarning: divide by zero encountered in true_divide
  K = (u / d).T[:n_components]  # see (6.33) p.140
/opt/anaconda3/lib/python3.7/site-packages/sklearn/decomposition/_fastica.py:481: RuntimeWarning: invalid value encountered in true_divide
  K = (u / d).T[:n_components]  # see (6.33) p.140
{'fraction_non_alphanumeric': 0.13997113997113997, 'fraction_numerical': 0.05339105339105339, 'mean_word_length': 4.642276422764228, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '408728', 'license': 'MIT', 'n_tokens_mistral': 287, 'n_tokens_neox': 264, 'n_words': 56, 'path': 'independent_component_analysis.ipynb', 'repo_name': 'Sblbl/ML_implementations', 'size': '693'}