Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Modifying activation methods and inserting a layer #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 20 additions & 9 deletions ArtificialNeuralNetwork.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@
"# Adding the input layer and the first hidden layer\n",
"classifier.add(Dense(units = 6, kernel_initializer = 'uniform', activation = 'relu', input_dim = 11))\n",
"\n",
"# Adding the second hidden layer\n",
"classifier.add(Dense(units = 6, kernel_initializer = 'uniform', activation = 'relu'))\n",
"\n",
"# Adding the second and third hidden layer\n",
"classifier.add(Dense(units = 6, kernel_initializer = 'uniform', activation = 'tanh'))\n",
"classifier.add(Dense(units = 6, kernel_initializer = 'uniform', activation = 'tanh'))\n",
"# Adding the output layer\n",
"classifier.add(Dense(units = 1, kernel_initializer = 'uniform', activation = 'sigmoid'))\n",
"\n",
Expand Down Expand Up @@ -155,15 +155,26 @@
"\n",
"# Making the Confusion Matrix\n",
"from sklearn.metrics import confusion_matrix\n",
"cm = confusion_matrix(y_test, y_pred)"
"cm = confusion_matrix(y_test, y_pred)\n",
"print(cm)"
]
},
{
"cell_type": "code",
"execution_count": null,
"cell_type": "markdown",
"metadata": {},
"outputs": [],
"source": []
"source": [
"1 relu = [[1505 90]\n",
" [ 196 209]] = 85,7%\n",
" \n",
"2 relu = [[1556 39]\n",
" [ 278 127]] = 84,15%\n",
" \n",
"1 tanh = [[1526 69]\n",
" [ 206 199]] = 86,25%\n",
" \n",
"2 tanh = [[1544 51]\n",
" [ 258 147]] = 84,55%"
]
}
],
"metadata": {
Expand All @@ -182,7 +193,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.5.3"
}
},
"nbformat": 4,
Expand Down
Loading