Spaces:
Paused
Paused
File size: 3,557 Bytes
2df6a4f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
{
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"id": "initial_id",
"metadata": {
"collapsed": true,
"ExecuteTime": {
"end_time": "2024-03-24T11:48:41.895997Z",
"start_time": "2024-03-24T11:48:41.863555Z"
}
},
"outputs": [
{
"data": {
"text/plain": " Model Accuracy Precision Recall F1 Score Evaluation Time \\\n0 Dummy 0.5 0.5 0.5 0.5 0.5 \n0 Dummy2 0.6 0.6 0.6 0.6 0.6 \n\n Overall Score \n0 0.5 \n0 0.6 ",
"text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>Model</th>\n <th>Accuracy</th>\n <th>Precision</th>\n <th>Recall</th>\n <th>F1 Score</th>\n <th>Evaluation Time</th>\n <th>Overall Score</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>Dummy</td>\n <td>0.5</td>\n <td>0.5</td>\n <td>0.5</td>\n <td>0.5</td>\n <td>0.5</td>\n <td>0.5</td>\n </tr>\n <tr>\n <th>0</th>\n <td>Dummy2</td>\n <td>0.6</td>\n <td>0.6</td>\n <td>0.6</td>\n <td>0.6</td>\n <td>0.6</td>\n <td>0.6</td>\n </tr>\n </tbody>\n</table>\n</div>"
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"\n",
"# Build a dataframe with Model, Accuracy, Precision, Recall, F1 Score, Evaluation Time, Overall Score\n",
"\n",
"model_results = pd.DataFrame(columns=['Model', 'Accuracy', 'Precision', 'Recall', 'F1 Score', 'Evaluation Time', 'Overall Score'])\n",
"\n",
"# Add dummy data using concat\n",
"model_results = pd.concat([model_results, pd.DataFrame([['Dummy', 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]], columns=['Model', 'Accuracy', 'Precision', 'Recall', 'F1 Score', 'Evaluation Time', 'Overall Score'])])\n",
"\n",
"# add more dummy data\n",
"model_results = pd.concat([model_results, pd.DataFrame([['Dummy2', 0.6, 0.6, 0.6, 0.6, 0.6, 0.6]], columns=['Model', 'Accuracy', 'Precision', 'Recall', 'F1 Score', 'Evaluation Time', 'Overall Score'])])\n",
"\n",
"model_results"
]
},
{
"cell_type": "code",
"outputs": [],
"source": [
"# Save the model results to a csv file\n",
"model_results.to_csv('CQI_Leaderboard.csv', index=False)"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-03-24T11:49:23.687615Z",
"start_time": "2024-03-24T11:49:23.602354Z"
}
},
"id": "d6d288e1af91dd1d",
"execution_count": 4
},
{
"cell_type": "code",
"outputs": [],
"source": [],
"metadata": {
"collapsed": false
},
"id": "f164c55726b7cbaf"
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
|