Path: blob/main/ML/3. Neural Network/3_Neural_Network.ipynb
423 views
Kernel: Python 3 (ipykernel)
In [1]:
In [2]:
Out[2]:
In [3]:
Out[3]:
['CreditScore', 'Geography', 'Gender', 'Age', 'Tenure', 'Balance', 'NumOfProducts', 'HasCrCard', 'IsActiveMember', 'EstimatedSalary']
['Exited']
In [4]:
In [5]:
In [6]:
We are treating countries with ordinal values(0 < 1 < 2) but they are incomparable. To solve this we can use one hot encoding. We will perform some standardization
In [7]:
In [8]:
In [9]:
In [10]:
In [11]:
In [12]:
In [13]:
In [14]:
In [15]:
Out[15]:
Model: "sequential"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
dense (Dense) (None, 6) 72
dropout (Dropout) (None, 6) 0
dense_1 (Dense) (None, 6) 42
dropout_1 (Dropout) (None, 6) 0
dense_2 (Dense) (None, 1) 7
=================================================================
Total params: 121
Trainable params: 121
Non-trainable params: 0
_________________________________________________________________
In [16]:
In [ ]:
In [19]:
Out[19]:
63/63 [==============================] - 0s 1ms/step
[[0.21353428]
[0.3550975 ]
[0.1884149 ]
[0.04963601]
[0.2057534 ]]
In [20]:
Out[20]:
[[0]
[0]
[0]
[0]
[0]]
In [21]:
Out[21]:
[[1569 26]
[ 293 112]]
In [22]:
Out[22]:
84.05 % of data was classified correctly