from numpy import loadtxt, genfromtxt
from sklearn.preprocessing import OneHotEncoder


filename = "avila.txt"
data = genfromtxt("data/"+filename, delimiter=",", dtype=str)
X, Y = data[:,:-1], data[:,-1]
one_hot_data = OneHotEncoder(handle_unknown='ignore').fit(X)
one_hot_data_X = one_hot_data.transform(X).toarray()
print(one_hot_data_X.shape)
