genre_list = data.iloc[:, -1]
encoder = LabelEncoder()
y = encoder.fit_transform(genre_list)

#Scaling the Feature columns--------------------------------------------------------------

scaler = StandardScaler()
x = scaler.fit_transform(np.array(data.iloc[:, :-1], dtype=float))

#Dividing data into Training and Testing set----------------------------------------------

x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.2)

#Classification with Keras--------------------------------

model = NeuralNetwork.BuildingNetwork(x_train, y_train, x_test, y_test)
NeuralNetwork.ValidatingApproach(x_train, y_train, x_test, y_test)

#Predictions on Test Data-----------------------------------------------------------------

predictions = model.predict(x_test)

#Testing on 10 random songs----------------------------------------------------------------------
count = 0
print(
    "------------------------------ Prediction of random 10 song ------------------------------"
)
for x in range(10):
    print("Prediction: ", genres[np.argmax(predictions[x])], "\t Actual: ",
          genres[y_test[x]])
    if (genres[np.argmax(predictions[x])] == genres[y_test[x]]):