mirror of
https://github.com/ArthurDanjou/ArtStudies.git
synced 2026-01-27 12:54:24 +01:00
add: TP1/2
This commit is contained in:
@@ -17,13 +17,12 @@
|
||||
{
|
||||
"metadata": {
|
||||
"ExecuteTime": {
|
||||
"end_time": "2025-03-24T13:10:01.794956Z",
|
||||
"start_time": "2025-03-24T13:09:58.777694Z"
|
||||
"end_time": "2025-03-24T14:45:40.568860Z",
|
||||
"start_time": "2025-03-24T14:45:37.895550Z"
|
||||
}
|
||||
},
|
||||
"cell_type": "code",
|
||||
"source": [
|
||||
"\n",
|
||||
"import numpy as np\n",
|
||||
"from sklearn.neural_network import MLPClassifier\n",
|
||||
"from sklearn.datasets import make_classification\n",
|
||||
@@ -42,7 +41,7 @@
|
||||
" y_pred = model.predict(X_test)\n",
|
||||
" accuracies.append(accuracy_score(y_test, y_pred))\n",
|
||||
"\n",
|
||||
"print(f'Accuracy: {np.mean(accuracies) * 100:.0f}%')\n",
|
||||
"print(f'Mean Accuracy: {np.mean(accuracies) * 100:.0f}%')\n",
|
||||
"print(f\"Max accuracy: {np.max(accuracies) * 100:.0f}%\")\n",
|
||||
"print(f\"Min accuracy: {np.min(accuracies) * 100:.0f}%\")"
|
||||
],
|
||||
@@ -52,21 +51,26 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Accuracy: 93%\n",
|
||||
"Max accuracy: 100%\n",
|
||||
"Min accuracy: 80%\n"
|
||||
"Mean Accuracy: 92%\n",
|
||||
"Max accuracy: 96%\n",
|
||||
"Min accuracy: 86%\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"execution_count": 21
|
||||
"execution_count": 28
|
||||
},
|
||||
{
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"ExecuteTime": {
|
||||
"end_time": "2025-03-24T14:37:53.507776Z",
|
||||
"start_time": "2025-03-24T14:37:53.505376Z"
|
||||
}
|
||||
},
|
||||
"cell_type": "code",
|
||||
"outputs": [],
|
||||
"execution_count": null,
|
||||
"source": "",
|
||||
"id": "96b6d46883ed5570"
|
||||
"id": "96b6d46883ed5570",
|
||||
"outputs": [],
|
||||
"execution_count": null
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
||||
Reference in New Issue
Block a user