Skip to content

Instantly share code, notes, and snippets.

@Neeratyoy
Created October 25, 2019 16:27
Show Gist options
  • Save Neeratyoy/2e583e0cdbb53f6ebec0579cc7d5cda6 to your computer and use it in GitHub Desktop.
Save Neeratyoy/2e583e0cdbb53f6ebec0579cc7d5cda6 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"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>run_id</th>\n",
" <th>task_id</th>\n",
" <th>setup_id</th>\n",
" <th>flow_id</th>\n",
" <th>flow_name</th>\n",
" <th>data_id</th>\n",
" <th>data_name</th>\n",
" <th>function</th>\n",
" <th>upload_time</th>\n",
" <th>uploader</th>\n",
" <th>uploader_name</th>\n",
" <th>value</th>\n",
" <th>values</th>\n",
" <th>array_data</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>3549</th>\n",
" <td>523926</td>\n",
" <td>59</td>\n",
" <td>3526</td>\n",
" <td>2629</td>\n",
" <td>sklearn.ensemble.forest.RandomForestClassifier(8)</td>\n",
" <td>61</td>\n",
" <td>iris</td>\n",
" <td>predictive_accuracy</td>\n",
" <td>2016-02-11 22:05:23</td>\n",
" <td>869</td>\n",
" <td>p.gijsbers@student.tue.nl</td>\n",
" <td>0.966667</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4353</th>\n",
" <td>8955370</td>\n",
" <td>59</td>\n",
" <td>6890988</td>\n",
" <td>7257</td>\n",
" <td>sklearn.ensemble.forest.RandomForestClassifier...</td>\n",
" <td>61</td>\n",
" <td>iris</td>\n",
" <td>predictive_accuracy</td>\n",
" <td>2018-04-06 16:32:22</td>\n",
" <td>3964</td>\n",
" <td>clear.tsai@gmail.com</td>\n",
" <td>0.960000</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3587</th>\n",
" <td>1852682</td>\n",
" <td>59</td>\n",
" <td>29263</td>\n",
" <td>5500</td>\n",
" <td>sklearn.ensemble.forest.RandomForestClassifier...</td>\n",
" <td>61</td>\n",
" <td>iris</td>\n",
" <td>predictive_accuracy</td>\n",
" <td>2017-03-15 22:55:18</td>\n",
" <td>1022</td>\n",
" <td>rso@randalolson.com</td>\n",
" <td>0.960000</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4375</th>\n",
" <td>8886608</td>\n",
" <td>59</td>\n",
" <td>6835139</td>\n",
" <td>7961</td>\n",
" <td>sklearn.pipeline.Pipeline(Imputer=sklearn.prep...</td>\n",
" <td>61</td>\n",
" <td>iris</td>\n",
" <td>predictive_accuracy</td>\n",
" <td>2018-03-17 16:46:27</td>\n",
" <td>5032</td>\n",
" <td>rashmi.kamath01@gmail.com</td>\n",
" <td>0.960000</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3107</th>\n",
" <td>1843272</td>\n",
" <td>59</td>\n",
" <td>24071</td>\n",
" <td>4830</td>\n",
" <td>sklearn.ensemble.forest.RandomForestClassifier...</td>\n",
" <td>61</td>\n",
" <td>iris</td>\n",
" <td>predictive_accuracy</td>\n",
" <td>2016-12-08 20:10:03</td>\n",
" <td>2</td>\n",
" <td>joaquin.vanschoren@gmail.com</td>\n",
" <td>0.960000</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" run_id task_id setup_id flow_id \\\n",
"3549 523926 59 3526 2629 \n",
"4353 8955370 59 6890988 7257 \n",
"3587 1852682 59 29263 5500 \n",
"4375 8886608 59 6835139 7961 \n",
"3107 1843272 59 24071 4830 \n",
"\n",
" flow_name data_id data_name \\\n",
"3549 sklearn.ensemble.forest.RandomForestClassifier(8) 61 iris \n",
"4353 sklearn.ensemble.forest.RandomForestClassifier... 61 iris \n",
"3587 sklearn.ensemble.forest.RandomForestClassifier... 61 iris \n",
"4375 sklearn.pipeline.Pipeline(Imputer=sklearn.prep... 61 iris \n",
"3107 sklearn.ensemble.forest.RandomForestClassifier... 61 iris \n",
"\n",
" function upload_time uploader \\\n",
"3549 predictive_accuracy 2016-02-11 22:05:23 869 \n",
"4353 predictive_accuracy 2018-04-06 16:32:22 3964 \n",
"3587 predictive_accuracy 2017-03-15 22:55:18 1022 \n",
"4375 predictive_accuracy 2018-03-17 16:46:27 5032 \n",
"3107 predictive_accuracy 2016-12-08 20:10:03 2 \n",
"\n",
" uploader_name value values array_data \n",
"3549 p.gijsbers@student.tue.nl 0.966667 None None \n",
"4353 clear.tsai@gmail.com 0.960000 None None \n",
"3587 rso@randalolson.com 0.960000 None None \n",
"4375 rashmi.kamath01@gmail.com 0.960000 None None \n",
"3107 joaquin.vanschoren@gmail.com 0.960000 None None "
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"task_rf.sort_values(by='value', ascending=False).head()"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"OpenML Flow\n",
"===========\n",
"Flow ID.........: 2629 (version 8)\n",
"Flow URL........: https://www.openml.org/f/2629\n",
"Flow Name.......: sklearn.ensemble.forest.RandomForestClassifier\n",
"Flow Description: Flow generated by openml_run\n",
"Upload Date.....: 2016-02-11 21:17:08\n",
"Dependencies....: None"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Fetching the Random Forest flow with the best score\n",
"f = openml.flows.get_flow(2629)\n",
"f"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"OpenML Run\n",
"==========\n",
"Uploader Name...: Pieter Gijsbers\n",
"Uploader Profile: https://www.openml.org/u/869\n",
"Metric..........: predictive_accuracy\n",
"Result..........: 0.966667\n",
"Run ID..........: 523926\n",
"Run URL.........: https://www.openml.org/r/523926\n",
"Task ID.........: 59\n",
"Task Type.......: Supervised Classification\n",
"Task URL........: https://www.openml.org/t/59\n",
"Flow ID.........: 2629\n",
"Flow Name.......: sklearn.ensemble.forest.RandomForestClassifier(8)\n",
"Flow URL........: https://www.openml.org/f/2629\n",
"Setup ID........: 3526\n",
"Setup String....: None\n",
"Dataset ID......: 61\n",
"Dataset URL.....: https://www.openml.org/d/61"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Fetching the run with the best score for\n",
"# Random Forest on Iris\n",
"r = openml.runs.get_run(523926)\n",
"r"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment