<jupyter_start><jupyter_text>Fetuares distribution visualization<jupyter_code>feature_names = list(X.columns)

for f_name in feature_names[1:]:    
    sns.kdeplot(x=f_name, data=X, label=f_name) 
plt.legend()
pass
feature_names = list(X.columns)

for f_name in feature_names[:1]:    
    sns.kdeplot(x=f_name, data=X, label=f_name) 
plt.legend()
pass<jupyter_output><empty_output><jupyter_text>PCA<jupyter_code>from sklearn import decomposition
pca = decomposition.PCA(n_components=2)
pc = pca.fit_transform(X)

pc_df = pd.DataFrame(data=pc, columns = ['PC1', 'PC2'])
pc_df['target'] = Y.values.squeeze()
pc_df.head()
sns.lmplot(x="PC1", y="PC2",
           data=pc_df, 
           fit_reg=False, 
           hue='target', # color by target
           legend=True,
           scatter_kws={"s": 7}) # specify the point size
pass<jupyter_output><empty_output><jupyter_text>TSNE (yet another method for dimensionality reduction)<jupyter_code>from sklearn.manifold import TSNE
tsne = TSNE(n_components=2, verbose=1, random_state=42)
tsne_components = tsne.fit_transform(X)

tsne_df = pd.DataFrame(data=tsne_components, columns = ['tsne1', 'tsne2'])
tsne_df['target'] = Y.values.squeeze()
sns.lmplot(x="tsne1", y="tsne2",
           data=tsne_df, 
           fit_reg=False, 
           hue='target', # color by target
           legend=True,
           scatter_kws={"s": 7}) # specify the point size
pass<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13636363636363635, 'fraction_numerical': 0.011888111888111888, 'mean_word_length': 4.420454545454546, 'pattern_counts': {'":': 2, '<': 13, '<?xml version=': 0, '>': 13, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '600932', 'license': 'MIT', 'n_tokens_mistral': 558, 'n_tokens_neox': 540, 'n_words': 93, 'path': 'notebooks/eda/EDA_of_data.ipynb', 'repo_name': 'alexeyhorkin/ml_dl_with_topology_data', 'size': '1430'}