# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: conda_tensorflow_p36
#     language: python
#     name: conda_tensorflow_p36
# ---

# Just exploring the labels distribution. 

import numpy as np
import matplotlib.pyplot as plt

X_train = np.loadtxt('x_train2.csv', delimiter=',')
Y_train = np.loadtxt('y_train2.csv', delimiter=',')

Y_train_1d = [np.argmax(vector) for  vector in Y_train]

plt.hist(Y_train_1d, bins=40)

# So the PCA is useless because it does not take into account the order of the symbols, among other things. 

from sklearn.decomposition import PCA

pca = PCA(n_components=2)

pca.fit(X_train)

X_pca = pca.transform(X_train)

plt.scatter(X_pca[:, 0], X_pca[:, 1], alpha = 0.1)





StarcoderdataJupyterScriptsDedupFiltered