ium_434788/IUM_5_434788_wersja_Jupyter.ipynb
2021-04-17 18:33:36 +02:00

208 KiB
Raw Blame History

Dostępna jest również wersja na Dockerze

0. Imports and downloading the Data Frame

from tensorflow.keras.models import Sequential, load_model
from tensorflow.keras.layers import Dense
from sklearn.metrics import accuracy_score
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
from sklearn.model_selection import train_test_split

0.1. Wyczytanie pliku csv z mojego repo

!curl -OL https://git.wmi.amu.edu.pl/s434788/ium_434788/raw/branch/master/winequality-red.csv

wine=pd.read_csv('winequality-red.csv')
wine
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   98k    0   98k    0     0  75449      0 --:--:--  0:00:01 --:--:-- 75449
fixed acidity volatile acidity citric acid residual sugar chlorides free sulfur dioxide total sulfur dioxide density pH sulphates alcohol quality
0 7.4 0.700 0.00 1.9 0.076 11.0 34.0 0.99780 3.51 0.56 9.4 5
1 7.8 0.880 0.00 2.6 0.098 25.0 67.0 0.99680 3.20 0.68 9.8 5
2 7.8 0.760 0.04 2.3 0.092 15.0 54.0 0.99700 3.26 0.65 9.8 5
3 11.2 0.280 0.56 1.9 0.075 17.0 60.0 0.99800 3.16 0.58 9.8 6
4 7.4 0.700 0.00 1.9 0.076 11.0 34.0 0.99780 3.51 0.56 9.4 5
... ... ... ... ... ... ... ... ... ... ... ... ...
1594 6.2 0.600 0.08 2.0 0.090 32.0 44.0 0.99490 3.45 0.58 10.5 5
1595 5.9 0.550 0.10 2.2 0.062 39.0 51.0 0.99512 3.52 0.76 11.2 6
1596 6.3 0.510 0.13 2.3 0.076 29.0 40.0 0.99574 3.42 0.75 11.0 6
1597 5.9 0.645 0.12 2.0 0.075 32.0 44.0 0.99547 3.57 0.71 10.2 5
1598 6.0 0.310 0.47 3.6 0.067 18.0 42.0 0.99549 3.39 0.66 11.0 6

1599 rows × 12 columns

1. Analiza zbioru

1.1. Heatmap by zbada korelacje. Z początku zastanawiałem się, czy nie wykorzystać tylko kolumn wysoko skorelowanych z 'Quality', jednak koniec końców model będzie się opierać o wszystkie kolumny

plt.figure(figsize=(10,6))
sns.heatmap(wine.corr(),annot=True)
plt.show()

2. Normalizacja i podział zbioru na Test/Train

2.1. 'y' to pojedyńcza kolumna z wartościami 'quality'

y = wine.quality
y.head()
0    5
1    5
2    5
3    6
4    5
Name: quality, dtype: int64

2.2. 'x' to wszystkie kolumny poza 'quality'

x = wine.drop(['quality'], axis= 1)
x.head()
fixed acidity volatile acidity citric acid residual sugar chlorides free sulfur dioxide total sulfur dioxide density pH sulphates alcohol
0 7.4 0.70 0.00 1.9 0.076 11.0 34.0 0.9978 3.51 0.56 9.4
1 7.8 0.88 0.00 2.6 0.098 25.0 67.0 0.9968 3.20 0.68 9.8
2 7.8 0.76 0.04 2.3 0.092 15.0 54.0 0.9970 3.26 0.65 9.8
3 11.2 0.28 0.56 1.9 0.075 17.0 60.0 0.9980 3.16 0.58 9.8
4 7.4 0.70 0.00 1.9 0.076 11.0 34.0 0.9978 3.51 0.56 9.4

2.3. Normalizacja wartości w x (do przedziału 0-1)

x=((x-x.min())/(x.max()-x.min()))
x.head()
fixed acidity volatile acidity citric acid residual sugar chlorides free sulfur dioxide total sulfur dioxide density pH sulphates alcohol
0 0.247788 0.397260 0.00 0.068493 0.106845 0.140845 0.098940 0.567548 0.606299 0.137725 0.153846
1 0.283186 0.520548 0.00 0.116438 0.143573 0.338028 0.215548 0.494126 0.362205 0.209581 0.215385
2 0.283186 0.438356 0.04 0.095890 0.133556 0.197183 0.169611 0.508811 0.409449 0.191617 0.215385
3 0.584071 0.109589 0.56 0.068493 0.105175 0.225352 0.190813 0.582232 0.330709 0.149701 0.215385
4 0.247788 0.397260 0.00 0.068493 0.106845 0.140845 0.098940 0.567548 0.606299 0.137725 0.153846

2.4. Podział na zbiory testowe i treningowe (1:4)

x_train, x_test, y_train, y_test = train_test_split(x,y , test_size=0.2,train_size=0.8, random_state=21)
x_train.head()
fixed acidity volatile acidity citric acid residual sugar chlorides free sulfur dioxide total sulfur dioxide density pH sulphates alcohol
870 0.274336 0.407534 0.01 0.082192 0.086811 0.422535 0.130742 0.267254 0.527559 0.143713 0.523077
3 0.584071 0.109589 0.56 0.068493 0.105175 0.225352 0.190813 0.582232 0.330709 0.149701 0.215385
45 0.000000 0.273973 0.15 0.082192 0.070117 0.098592 0.208481 0.244493 0.913386 0.137725 0.723077
780 0.212389 0.308219 0.00 0.075342 0.297162 0.154930 0.137809 0.491189 0.448819 0.161677 0.153846
976 0.230088 0.198630 0.30 0.082192 0.118531 0.478873 0.233216 0.508811 0.551181 0.113772 0.153846

3. Model i jego trening (Tensorflow.Keras)

def regression_model():
    model = Sequential()
    model.add(Dense(32,activation = "relu", input_shape = (x_train.shape[1],)))
    model.add(Dense(64,activation = "relu"))
    model.add(Dense(1,activation = "relu"))
    
    model.compile(optimizer = "adam", loss = "mean_squared_error")
    return model
model = regression_model()
model.fit(x_train, y_train, epochs = 600, verbose = 1)
Epoch 1/600
40/40 [==============================] - 0s 2ms/step - loss: 27.0722
Epoch 2/600
40/40 [==============================] - 0s 2ms/step - loss: 7.8550
Epoch 3/600
40/40 [==============================] - 0s 2ms/step - loss: 1.1584
Epoch 4/600
40/40 [==============================] - 0s 2ms/step - loss: 0.9741
Epoch 5/600
40/40 [==============================] - 0s 2ms/step - loss: 0.9378
Epoch 6/600
40/40 [==============================] - 0s 2ms/step - loss: 0.8014
Epoch 7/600
40/40 [==============================] - 0s 2ms/step - loss: 0.7171
Epoch 8/600
40/40 [==============================] - 0s 1ms/step - loss: 0.6538
Epoch 9/600
40/40 [==============================] - 0s 1ms/step - loss: 0.7108
Epoch 10/600
40/40 [==============================] - 0s 2ms/step - loss: 0.6757
Epoch 11/600
40/40 [==============================] - 0s 2ms/step - loss: 0.6143
Epoch 12/600
40/40 [==============================] - 0s 1ms/step - loss: 0.5839
Epoch 13/600
40/40 [==============================] - 0s 2ms/step - loss: 0.5464
Epoch 14/600
40/40 [==============================] - 0s 2ms/step - loss: 0.5382
Epoch 15/600
40/40 [==============================] - 0s 2ms/step - loss: 0.5355
Epoch 16/600
40/40 [==============================] - 0s 2ms/step - loss: 0.5039
Epoch 17/600
40/40 [==============================] - 0s 2ms/step - loss: 0.5245
Epoch 18/600
40/40 [==============================] - 0s 2ms/step - loss: 0.5104
Epoch 19/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4445
Epoch 20/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4727
Epoch 21/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4921
Epoch 22/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4548
Epoch 23/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4569
Epoch 24/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4608
Epoch 25/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4281
Epoch 26/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4640
Epoch 27/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4457
Epoch 28/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4267
Epoch 29/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4892
Epoch 30/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4421
Epoch 31/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3928
Epoch 32/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4320
Epoch 33/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4135
Epoch 34/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4090
Epoch 35/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3813
Epoch 36/600
40/40 [==============================] - 0s 1ms/step - loss: 0.3866
Epoch 37/600
40/40 [==============================] - 0s 1ms/step - loss: 0.3960
Epoch 38/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3816
Epoch 39/600
40/40 [==============================] - 0s 1ms/step - loss: 0.3651
Epoch 40/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4080
Epoch 41/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4022
Epoch 42/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3986
Epoch 43/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3999
Epoch 44/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3736
Epoch 45/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3777
Epoch 46/600
40/40 [==============================] - 0s 1ms/step - loss: 0.3688
Epoch 47/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3823
Epoch 48/600
40/40 [==============================] - 0s 1ms/step - loss: 0.4036
Epoch 49/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3661
Epoch 50/600
40/40 [==============================] - 0s 1ms/step - loss: 0.3900
Epoch 51/600
40/40 [==============================] - 0s 1ms/step - loss: 0.3591
Epoch 52/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3651
Epoch 53/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3740
Epoch 54/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4092
Epoch 55/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4019
Epoch 56/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3838
Epoch 57/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3893
Epoch 58/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4165
Epoch 59/600
40/40 [==============================] - 0s 1ms/step - loss: 0.3723
Epoch 60/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4293
Epoch 61/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3633
Epoch 62/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3889
Epoch 63/600
40/40 [==============================] - 0s 2ms/step - loss: 0.4001
Epoch 64/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3785
Epoch 65/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3762
Epoch 66/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3975
Epoch 67/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3809
Epoch 68/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3740
Epoch 69/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3885
Epoch 70/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3763
Epoch 71/600
40/40 [==============================] - 0s 1ms/step - loss: 0.3575
Epoch 72/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3758
Epoch 73/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3882
Epoch 74/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3640
Epoch 75/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3613
Epoch 76/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3723
Epoch 77/600
40/40 [==============================] - 0s 1ms/step - loss: 0.3710
Epoch 78/600
40/40 [==============================] - 0s 1ms/step - loss: 0.3882
Epoch 79/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3682
Epoch 80/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3781
Epoch 81/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3734
Epoch 82/600
40/40 [==============================] - 0s 1ms/step - loss: 0.3715
Epoch 83/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3850
Epoch 84/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3759
Epoch 85/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3625
Epoch 86/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3862
Epoch 87/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3879
Epoch 88/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3427
Epoch 89/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3654
Epoch 90/600
40/40 [==============================] - 0s 1ms/step - loss: 0.3467
Epoch 91/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3783
Epoch 92/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3543
Epoch 93/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3732
Epoch 94/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3606
Epoch 95/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3674
Epoch 96/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3407
Epoch 97/600
40/40 [==============================] - 0s 1ms/step - loss: 0.3840
Epoch 98/600
40/40 [==============================] - 0s 1ms/step - loss: 0.3440
Epoch 99/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3525
Epoch 100/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3484
Epoch 101/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3337
Epoch 102/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3739
Epoch 103/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3768
Epoch 104/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3694
Epoch 105/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3833
Epoch 106/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3900
Epoch 107/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3788
Epoch 108/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3571
Epoch 109/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3593
Epoch 110/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3462
Epoch 111/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3550
Epoch 112/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3869
Epoch 113/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3678
Epoch 114/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3520
Epoch 115/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3788
Epoch 116/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3599
Epoch 117/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3636
Epoch 118/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3502
Epoch 119/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3576
Epoch 120/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3847
Epoch 121/600
40/40 [==============================] - 0s 1ms/step - loss: 0.3688
Epoch 122/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3654
Epoch 123/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3557
Epoch 124/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3814
Epoch 125/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3510
Epoch 126/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3759
Epoch 127/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3436
Epoch 128/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3668
Epoch 129/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3832
Epoch 130/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3839
Epoch 131/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3667
Epoch 132/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3318
Epoch 133/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3904
Epoch 134/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3848
Epoch 135/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3541
Epoch 136/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3609
Epoch 137/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3967
Epoch 138/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3462
Epoch 139/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3637
Epoch 140/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3752
Epoch 141/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3224
Epoch 142/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3671
Epoch 143/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3650
Epoch 144/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3743
Epoch 145/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3483
Epoch 146/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3553
Epoch 147/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3336
Epoch 148/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3450
Epoch 149/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3431
Epoch 150/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3589
Epoch 151/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3693
Epoch 152/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3710
Epoch 153/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3464
Epoch 154/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3729
Epoch 155/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3477
Epoch 156/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3611
Epoch 157/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3365
Epoch 158/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3522
Epoch 159/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3642
Epoch 160/600
40/40 [==============================] - 0s 1ms/step - loss: 0.3800
Epoch 161/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3511
Epoch 162/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3757
Epoch 163/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3680
Epoch 164/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3573
Epoch 165/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3608
Epoch 166/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3468
Epoch 167/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3564
Epoch 168/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3833
Epoch 169/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3437
Epoch 170/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3637
Epoch 171/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3383
Epoch 172/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3360
Epoch 173/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3754
Epoch 174/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3467
Epoch 175/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3559
Epoch 176/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3621
Epoch 177/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3501
Epoch 178/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3370
Epoch 179/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3367
Epoch 180/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3650
Epoch 181/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3639
Epoch 182/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3301
Epoch 183/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3640
Epoch 184/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3400
Epoch 185/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3382
Epoch 186/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3481
Epoch 187/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3581
Epoch 188/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3623
Epoch 189/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3261
Epoch 190/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3510
Epoch 191/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3499
Epoch 192/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3543
Epoch 193/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3422
Epoch 194/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3392
Epoch 195/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3642
Epoch 196/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3313
Epoch 197/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3466
Epoch 198/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3448
Epoch 199/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3424
Epoch 200/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3327
Epoch 201/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3563
Epoch 202/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3281
Epoch 203/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3534
Epoch 204/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3736
Epoch 205/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3745
Epoch 206/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3547
Epoch 207/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3236
Epoch 208/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3298
Epoch 209/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3694
Epoch 210/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3370
Epoch 211/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3476
Epoch 212/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3632
Epoch 213/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3385
Epoch 214/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3623
Epoch 215/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3510
Epoch 216/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3374
Epoch 217/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3271
Epoch 218/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3529
Epoch 219/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3476
Epoch 220/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3405
Epoch 221/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3756
Epoch 222/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3287
Epoch 223/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3474
Epoch 224/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3328
Epoch 225/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3255
Epoch 226/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3584
Epoch 227/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3573
Epoch 228/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3600
Epoch 229/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3467
Epoch 230/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3400
Epoch 231/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3605
Epoch 232/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3500
Epoch 233/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3443
Epoch 234/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3637
Epoch 235/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3520
Epoch 236/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3330
Epoch 237/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3364
Epoch 238/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3277
Epoch 239/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3447
Epoch 240/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3600
Epoch 241/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3554
Epoch 242/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3431
Epoch 243/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3423
Epoch 244/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3374
Epoch 245/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3429
Epoch 246/600
40/40 [==============================] - 0s 1ms/step - loss: 0.3437
Epoch 247/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3335
Epoch 248/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3399
Epoch 249/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3285
Epoch 250/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3387
Epoch 251/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3734
Epoch 252/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3375
Epoch 253/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3506
Epoch 254/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3338
Epoch 255/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3418
Epoch 256/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3727
Epoch 257/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3387
Epoch 258/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3253
Epoch 259/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3249
Epoch 260/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3395
Epoch 261/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3284
Epoch 262/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3357
Epoch 263/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3431
Epoch 264/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3316
Epoch 265/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3474
Epoch 266/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3392
Epoch 267/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3328
Epoch 268/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3404
Epoch 269/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3278
Epoch 270/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3237
Epoch 271/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3356
Epoch 272/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3339
Epoch 273/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3243
Epoch 274/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3455
Epoch 275/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3777
Epoch 276/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3507
Epoch 277/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3203
Epoch 278/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3257
Epoch 279/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3669
Epoch 280/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3423
Epoch 281/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3377
Epoch 282/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3301
Epoch 283/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3232
Epoch 284/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3564
Epoch 285/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3434
Epoch 286/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3266
Epoch 287/600
40/40 [==============================] - 0s 1ms/step - loss: 0.3295
Epoch 288/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3181
Epoch 289/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3282
Epoch 290/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3421
Epoch 291/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3399
Epoch 292/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3355
Epoch 293/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3267
Epoch 294/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3393
Epoch 295/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3290
Epoch 296/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3223
Epoch 297/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3415
Epoch 298/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3232
Epoch 299/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3379
Epoch 300/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3216
Epoch 301/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3309
Epoch 302/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3009
Epoch 303/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3451
Epoch 304/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3027
Epoch 305/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3383
Epoch 306/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3128
Epoch 307/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3565
Epoch 308/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3416
Epoch 309/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3132
Epoch 310/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3420
Epoch 311/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3591
Epoch 312/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3135
Epoch 313/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3456
Epoch 314/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3243
Epoch 315/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3230
Epoch 316/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3144
Epoch 317/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3420
Epoch 318/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3008
Epoch 319/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3446
Epoch 320/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3214
Epoch 321/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3240
Epoch 322/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3116
Epoch 323/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3038
Epoch 324/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3337
Epoch 325/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3349
Epoch 326/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3143
Epoch 327/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3217
Epoch 328/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3309
Epoch 329/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3386
Epoch 330/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2841
Epoch 331/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3124
Epoch 332/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3266
Epoch 333/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3248
Epoch 334/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3132
Epoch 335/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3515
Epoch 336/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3207
Epoch 337/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3255
Epoch 338/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3154
Epoch 339/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3089
Epoch 340/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3216
Epoch 341/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3351
Epoch 342/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3136
Epoch 343/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3156
Epoch 344/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3171
Epoch 345/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3150
Epoch 346/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3282
Epoch 347/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3170
Epoch 348/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3107
Epoch 349/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3184
Epoch 350/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3137
Epoch 351/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3210
Epoch 352/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3378
Epoch 353/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3193
Epoch 354/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3543
Epoch 355/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3473
Epoch 356/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2978
Epoch 357/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3090
Epoch 358/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3289
Epoch 359/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3258
Epoch 360/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3304
Epoch 361/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3078
Epoch 362/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3203
Epoch 363/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3392
Epoch 364/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3343
Epoch 365/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3219
Epoch 366/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3158
Epoch 367/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2992
Epoch 368/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3134
Epoch 369/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3045
Epoch 370/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3154
Epoch 371/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3143
Epoch 372/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3085
Epoch 373/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3380
Epoch 374/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3421
Epoch 375/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3069
Epoch 376/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3197
Epoch 377/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3158
Epoch 378/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3690
Epoch 379/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3342
Epoch 380/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3039
Epoch 381/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3221
Epoch 382/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3055
Epoch 383/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3062
Epoch 384/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3309
Epoch 385/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3252
Epoch 386/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3486
Epoch 387/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3236
Epoch 388/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2999
Epoch 389/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3174
Epoch 390/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3185
Epoch 391/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2900
Epoch 392/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3218
Epoch 393/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3190
Epoch 394/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3086
Epoch 395/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3036
Epoch 396/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3022
Epoch 397/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3013
Epoch 398/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3004
Epoch 399/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3075
Epoch 400/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3114
Epoch 401/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3134
Epoch 402/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3015
Epoch 403/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3188
Epoch 404/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3361
Epoch 405/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3145
Epoch 406/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3189
Epoch 407/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3319
Epoch 408/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3059
Epoch 409/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3169
Epoch 410/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3008
Epoch 411/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3063
Epoch 412/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3134
Epoch 413/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3107
Epoch 414/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3048
Epoch 415/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3301
Epoch 416/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3004
Epoch 417/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2977
Epoch 418/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2948
Epoch 419/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3037
Epoch 420/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2772
Epoch 421/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3275
Epoch 422/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3133
Epoch 423/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3130
Epoch 424/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3039
Epoch 425/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2933
Epoch 426/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3135
Epoch 427/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2822
Epoch 428/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3012
Epoch 429/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2894
Epoch 430/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2937
Epoch 431/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2884
Epoch 432/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3112
Epoch 433/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3071
Epoch 434/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2895
Epoch 435/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2962
Epoch 436/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2956
Epoch 437/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2824
Epoch 438/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3114
Epoch 439/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2956
Epoch 440/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3009
Epoch 441/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2815
Epoch 442/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3120
Epoch 443/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2870
Epoch 444/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3305
Epoch 445/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2940
Epoch 446/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3027
Epoch 447/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2842
Epoch 448/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2884
Epoch 449/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2923
Epoch 450/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3051
Epoch 451/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2955
Epoch 452/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3041
Epoch 453/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2975
Epoch 454/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2971
Epoch 455/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2960
Epoch 456/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2768
Epoch 457/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3038
Epoch 458/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2719
Epoch 459/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3050
Epoch 460/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2923
Epoch 461/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2977
Epoch 462/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3008
Epoch 463/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3022
Epoch 464/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2882
Epoch 465/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2801
Epoch 466/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2922
Epoch 467/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3086
Epoch 468/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3123
Epoch 469/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3117
Epoch 470/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3058
Epoch 471/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2818
Epoch 472/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2960
Epoch 473/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2679
Epoch 474/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2972
Epoch 475/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2715
Epoch 476/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2815
Epoch 477/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2947
Epoch 478/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2832
Epoch 479/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3259
Epoch 480/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3108
Epoch 481/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3057
Epoch 482/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2826
Epoch 483/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2908
Epoch 484/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3112
Epoch 485/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2832
Epoch 486/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2817
Epoch 487/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3146
Epoch 488/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2778
Epoch 489/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2884
Epoch 490/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3069
Epoch 491/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2971
Epoch 492/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2808
Epoch 493/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2944
Epoch 494/600
40/40 [==============================] - 0s 1ms/step - loss: 0.2675
Epoch 495/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3146
Epoch 496/600
40/40 [==============================] - 0s 1ms/step - loss: 0.2698
Epoch 497/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2943
Epoch 498/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2926
Epoch 499/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2788
Epoch 500/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2932
Epoch 501/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2777
Epoch 502/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3025
Epoch 503/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2785
Epoch 504/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2917
Epoch 505/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2773
Epoch 506/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2790
Epoch 507/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2895
Epoch 508/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2906
Epoch 509/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2929
Epoch 510/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2884
Epoch 511/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2762
Epoch 512/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2800
Epoch 513/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2846
Epoch 514/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3170
Epoch 515/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2864
Epoch 516/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2761
Epoch 517/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2875
Epoch 518/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2767
Epoch 519/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2742
Epoch 520/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2869
Epoch 521/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2894
Epoch 522/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2789
Epoch 523/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2738
Epoch 524/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2797
Epoch 525/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3122
Epoch 526/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3101
Epoch 527/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2728
Epoch 528/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2959
Epoch 529/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3053
Epoch 530/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2888
Epoch 531/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2808
Epoch 532/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2743
Epoch 533/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2703
Epoch 534/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2816
Epoch 535/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2798
Epoch 536/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2982
Epoch 537/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2832
Epoch 538/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2650
Epoch 539/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2898
Epoch 540/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2876
Epoch 541/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2916
Epoch 542/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2800
Epoch 543/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2743
Epoch 544/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2603
Epoch 545/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2856
Epoch 546/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2960
Epoch 547/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2805
Epoch 548/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2860
Epoch 549/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2891
Epoch 550/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2796
Epoch 551/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2686
Epoch 552/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2687
Epoch 553/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2856
Epoch 554/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2830
Epoch 555/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2727
Epoch 556/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2916
Epoch 557/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2840
Epoch 558/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2884
Epoch 559/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2808
Epoch 560/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2696
Epoch 561/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2733
Epoch 562/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2811
Epoch 563/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2844
Epoch 564/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2977
Epoch 565/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3177
Epoch 566/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2673
Epoch 567/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2814
Epoch 568/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2773
Epoch 569/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2661
Epoch 570/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2860
Epoch 571/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2632
Epoch 572/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2537
Epoch 573/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2910
Epoch 574/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2541
Epoch 575/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2707
Epoch 576/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2525
Epoch 577/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2689
Epoch 578/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2751
Epoch 579/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2747
Epoch 580/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2754
Epoch 581/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2862
Epoch 582/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2617
Epoch 583/600
40/40 [==============================] - 0s 2ms/step - loss: 0.3128
Epoch 584/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2916
Epoch 585/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2729
Epoch 586/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2752
Epoch 587/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2752
Epoch 588/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2822
Epoch 589/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2671
Epoch 590/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2904
Epoch 591/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2853
Epoch 592/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2986
Epoch 593/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2821
Epoch 594/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2926
Epoch 595/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2931
Epoch 596/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2743
Epoch 597/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2620
Epoch 598/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2616
Epoch 599/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2621
Epoch 600/600
40/40 [==============================] - 0s 2ms/step - loss: 0.2799
<tensorflow.python.keras.callbacks.History at 0x7f21b42280d0>

4. Predykcje, Pokrycie, Precyzja i F-Score

y_pred = model.predict(x_test)

y_pred[:5]
array([[5.5316496],
       [5.08223  ],
       [4.947891 ],
       [6.1343417],
       [5.526009 ]], dtype=float32)
y_pred = np.around(y_pred, decimals=0)

y_pred[:5]
array([[6.],
       [5.],
       [5.],
       [6.],
       [6.]], dtype=float32)
accuracy_score(y_test, y_pred)
0.603125
from sklearn.metrics import classification_report
print(classification_report(y_test,y_pred)) 
              precision    recall  f1-score   support

         1.0       0.00      0.00      0.00         0
         3.0       0.00      0.00      0.00         1
         4.0       0.00      0.00      0.00         6
         5.0       0.75      0.62      0.68       152
         6.0       0.49      0.70      0.58       115
         7.0       0.66      0.47      0.55        40
         8.0       0.00      0.00      0.00         6

    accuracy                           0.60       320
   macro avg       0.27      0.26      0.26       320
weighted avg       0.61      0.60      0.60       320

/usr/local/lib/python3.7/dist-packages/sklearn/metrics/_classification.py:1272: UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.
  _warn_prf(average, modifier, msg_start, len(result))
/usr/local/lib/python3.7/dist-packages/sklearn/metrics/_classification.py:1272: UndefinedMetricWarning: Recall and F-score are ill-defined and being set to 0.0 in labels with no true samples. Use `zero_division` parameter to control this behavior.
  _warn_prf(average, modifier, msg_start, len(result))