Esercizio 
Usa il dataset riportato in basso e lo si utilizzi per addestrare e valutare un classificatore multiclasse la cui architettura sia una rete neurale densa.  Fornire un notebook Python contenente il codice sorgente ed il relativo output. 

test.csv

Bob has started his own mobile company. He wants to give tough fight to big companies like Apple,Samsung etc.

He does not know how to estimate price of mobiles his company creates. In this competitive mobile phone market you cannot simply assume things. To solve this problem he collects sales data of mobile phones of various companies.

Bob wants to find out some relation between features of a mobile phone(eg:- RAM,Internal Memory etc) and its selling price. But he is not so good at Machine Learning. So he needs your help to solve this problem.

In this problem you do not have to predict actual price but a price range indicating how high the price is

id
ID

battery_power
Total energy a battery can store in one time measured in mAh

blue
Has bluetooth or not

clock_speed
speed at which microprocessor executes instructions

dual_sim
Has dual sim support or not

fc
Front Camera mega pixels

four_g
Has 4G or not

int_memory
Internal Memory in Gigabytes

m_dep
Mobile Depth in cm

mobile_wt
Weight of mobile phone

n_cores
Number of cores of processor

pc
Primary Camera mega pixels

px_height
Pixel Resolution Height

px_width
Pixel Resolution Width

ram
Random Access Memory in Megabytes

sc_h
Screen Height of mobile in cm

sc_w
Screen Width of mobile in cm

talk_time
longest time that a single battery charge will last when you are

three_g
Has 3G or not

touch_screen
Has touch screen or not

wifi
Has wifi or not

--------
codice dal quale prendere spunto 

from tensorflow import keras
from tensorflow.keras import layers
from sklearn.metrics import confusion_matrix, accuracy_score
import matplotlib
import pandas as pd
import numpy as np

fashion_mnist = keras.datasets.fashion_mnist
(X_train, Y_train), (X_test, Y_test) = fashion_mnist.load_data()

print(X_train.shape)
print(Y_train.shape)

print(X_test.shape)
print(Y_test.shape)

class_names = ["T-shirt/top", "Trouser", "Pullover", "Dress", "Coat",
               "Sandal", "Shirt", "Sneaker", "Bag", "Ankle boot"]

class_names[Y_train[0]]

from tensorflow.keras.models import *
from tensorflow.keras.layers import *

model = Sequential()
model.add(Flatten(input_shape=[28, 28]))
model.add(Dense(50, activation="relu"))
model.add(Dense(30, activation="relu"))
model.add(Dense(20, activation="relu"))
model.add(Dense(10, activation="softmax"))

model.summary()

model.compile(loss="sparse_categorical_crossentropy", optimizer="adam", metrics=["accuracy"])

# Salvare il modello che ha le migliori performance sul validation set
checkpoint_cb = keras.callbacks.ModelCheckpoint("model.h5",
                                                verbose=False,
                                                save_best_only=True)

history = model.fit(X_train, Y_train,
                    batch_size=500, epochs=30,
                    validation_split=0.1,
                    callbacks=[checkpoint_cb])

df=pd.DataFrame(history.history)
df.plot()

model = keras.models.load_model("model.h5")

Y_test_pred = model.predict_classes(X_test)

Y_test[:10]

Y_test_pred[:10]

np.array(class_names)[Y_test_pred[:10]]

accuracy_score(Y_test_pred,Y_test)

confusion_matrix(Y_test_pred,Y_test)