File size: 3,488 Bytes
2df6a4f
 
 
 
b1839bb
2df6a4f
 
 
 
b1839bb
 
2df6a4f
 
 
 
 
b1839bb
 
2df6a4f
b1839bb
2df6a4f
 
 
 
 
 
 
 
 
 
 
 
 
b1839bb
2df6a4f
 
b1839bb
2df6a4f
 
 
 
 
 
 
 
 
 
 
 
 
 
b1839bb
 
2df6a4f
 
 
b1839bb
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": 5,
   "id": "initial_id",
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2024-03-24T13:27:06.474663Z",
     "start_time": "2024-03-24T13:27:06.433992Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": "    Model Accuracy Precision Recall F1 Score Evaluation Time Overall Score\n0   Dummy       51        59     54       52              50            50\n0  Dummy2       52        60     55       53              51            51",
      "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>51</td>\n      <td>59</td>\n      <td>54</td>\n      <td>52</td>\n      <td>50</td>\n      <td>50</td>\n    </tr>\n    <tr>\n      <th>0</th>\n      <td>Dummy2</td>\n      <td>52</td>\n      <td>60</td>\n      <td>55</td>\n      <td>53</td>\n      <td>51</td>\n      <td>51</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 5,
     "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', 51, 59, 54, 52, 50, 50]], 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', 52, 60, 55, 53, 51, 51]], 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-24T13:27:07.540305Z",
     "start_time": "2024-03-24T13:27:07.535417Z"
    }
   },
   "id": "d6d288e1af91dd1d",
   "execution_count": 6
  },
  {
   "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
}