"C:\\Users\\TOSHIBA\\AppData\\Roaming\\Python\\Python39\\site-packages\\networkx\\utils\\backends.py:135: RuntimeWarning: networkx backend defined more than once: nx-loopback\n",
" # Print the number of selected features for each closest point\n",
" print(f\"Closest Point {i+1}: Number of Features = {features_counts[idx]}, Train Accuracy = {train_accuracies[idx]}, Test Accuracy = {test_accuracies[idx]}\")\n",
"\n",
"\n",
" plt.show() "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### ***Evaluate model***\n"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"def print_clf_report_as_table(report):\n",
" data = []\n",
" for key, value in report.items():\n",
" if key != 'accuracy' and key != 'macro avg' and key != 'weighted avg':\n",