Commit 8e60ae27 authored by Chanelle Lee's avatar Chanelle Lee
Browse files

Fixed all errors with the logging on botsim

parent e5b07364
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 2
}
This diff is collapsed.
This diff is collapsed.
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"%config IPCompleter.greedy=True"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"import seaborn as sns"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"beliefDF = pd.read_csv('botSim_beliefs.csv', names=['time', 'agent', 'iteration', 'option', 'belief'], index_col='time')"
]
},
{
"cell_type": "code",
"execution_count": 6,
"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>agent</th>\n",
" <th>iteration</th>\n",
" <th>option</th>\n",
" <th>belief</th>\n",
" </tr>\n",
" <tr>\n",
" <th>time</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>2019-03-05 16:12:58</th>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0.076923</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:12:58</th>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:12:58</th>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:12:58</th>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:12:58</th>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" agent iteration option belief\n",
"time \n",
"2019-03-05 16:12:58 3 0 0 0.076923\n",
"2019-03-05 16:12:58 3 0 1 0.230769\n",
"2019-03-05 16:12:58 3 0 2 0.230769\n",
"2019-03-05 16:12:58 3 0 3 0.230769\n",
"2019-03-05 16:12:58 3 0 4 0.230769"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"beliefDF.head()"
]
},
{
"cell_type": "code",
"execution_count": 13,
"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>agent</th>\n",
" <th>iteration</th>\n",
" <th>option</th>\n",
" <th>belief</th>\n",
" </tr>\n",
" <tr>\n",
" <th>time</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>2019-03-05 16:12:58</th>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0.076923</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:12:58</th>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:12:58</th>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:12:58</th>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:12:58</th>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:05</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:05</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0.076923</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:05</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:05</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:05</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:09</th>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:09</th>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:09</th>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:09</th>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>0.076923</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:09</th>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:13</th>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:13</th>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:13</th>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:13</th>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>0.076923</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:13</th>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:22</th>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:22</th>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:22</th>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:22</th>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>0.230769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:22</th>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>0.076923</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:42</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0.157895</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:42</th>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0.157895</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:42</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0.157895</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:42</th>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0.157895</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:42</th>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0.157895</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:42</th>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0.157895</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:42</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0.473684</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:42</th>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0.157895</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:42</th>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0.157895</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:42</th>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0.473684</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:42</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>0.052632</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:42</th>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0.473684</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:42</th>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0.473684</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:42</th>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>0.052632</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:42</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>0.157895</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:42</th>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>0.052632</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:42</th>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>0.052632</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:42</th>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>0.157895</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:42</th>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>0.157895</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:42</th>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>0.157895</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:43</th>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0.034077</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:43</th>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0.011359</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:43</th>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0.920067</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:43</th>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>0.000421</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-03-05 16:13:43</th>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>0.034077</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" agent iteration option belief\n",
"time \n",
"2019-03-05 16:12:58 3 0 0 0.076923\n",
"2019-03-05 16:12:58 3 0 1 0.230769\n",
"2019-03-05 16:12:58 3 0 2 0.230769\n",
"2019-03-05 16:12:58 3 0 3 0.230769\n",
"2019-03-05 16:12:58 3 0 4 0.230769\n",
"2019-03-05 16:13:05 0 0 0 0.230769\n",
"2019-03-05 16:13:05 0 0 1 0.076923\n",
"2019-03-05 16:13:05 0 0 2 0.230769\n",
"2019-03-05 16:13:05 0 0 3 0.230769\n",
"2019-03-05 16:13:05 0 0 4 0.230769\n",
"2019-03-05 16:13:09 2 0 0 0.230769\n",
"2019-03-05 16:13:09 2 0 1 0.230769\n",
"2019-03-05 16:13:09 2 0 2 0.230769\n",
"2019-03-05 16:13:09 2 0 3 0.076923\n",
"2019-03-05 16:13:09 2 0 4 0.230769\n",
"2019-03-05 16:13:13 4 0 0 0.230769\n",
"2019-03-05 16:13:13 4 0 1 0.230769\n",
"2019-03-05 16:13:13 4 0 2 0.230769\n",
"2019-03-05 16:13:13 4 0 3 0.076923\n",
"2019-03-05 16:13:13 4 0 4 0.230769\n",
"2019-03-05 16:13:22 1 0 0 0.230769\n",
"2019-03-05 16:13:22 1 0 1 0.230769\n",
"2019-03-05 16:13:22 1 0 2 0.230769\n",
"2019-03-05 16:13:22 1 0 3 0.230769\n",
"2019-03-05 16:13:22 1 0 4 0.076923\n",
"2019-03-05 16:13:42 0 0 0 0.157895\n",
"2019-03-05 16:13:42 1 0 0 0.157895\n",
"2019-03-05 16:13:42 0 0 1 0.157895\n",
"2019-03-05 16:13:42 3 0 0 0.157895\n",
"2019-03-05 16:13:42 2 0 0 0.157895\n",
"2019-03-05 16:13:42 1 0 1 0.157895\n",
"2019-03-05 16:13:42 0 0 2 0.473684\n",
"2019-03-05 16:13:42 3 0 1 0.157895\n",
"2019-03-05 16:13:42 2 0 1 0.157895\n",
"2019-03-05 16:13:42 1 0 2 0.473684\n",
"2019-03-05 16:13:42 0 0 3 0.052632\n",
"2019-03-05 16:13:42 3 0 2 0.473684\n",
"2019-03-05 16:13:42 2 0 2 0.473684\n",
"2019-03-05 16:13:42 1 0 3 0.052632\n",
"2019-03-05 16:13:42 0 0 4 0.157895\n",
"2019-03-05 16:13:42 3 0 3 0.052632\n",
"2019-03-05 16:13:42 2 0 3 0.052632\n",
"2019-03-05 16:13:42 1 0 4 0.157895\n",
"2019-03-05 16:13:42 3 0 4 0.157895\n",
"2019-03-05 16:13:42 2 0 4 0.157895\n",
"2019-03-05 16:13:43 4 0 0 0.034077\n",
"2019-03-05 16:13:43 4 0 1 0.011359\n",
"2019-03-05 16:13:43 4 0 2 0.920067\n",
"2019-03-05 16:13:43 4 0 3 0.000421\n",
"2019-03-05 16:13:43 4 0 4 0.034077"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"beliefDF.loc[beliefDF['iteration']==0]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"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.7.2"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
%% Cell type:code id: tags:
``` python
%config IPCompleter.greedy=True
```
%% Cell type:code id: tags:
``` python
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
```
%% Cell type:code id: tags:
``` python
beliefDF = pd.read_csv('botSim_beliefs.csv', names=['time', 'agent', 'iteration', 'option', 'belief'], index_col='time')
```
%% Cell type:code id: tags:
``` python
beliefDF.head()
```
%%%% Output: execute_result
agent iteration option belief
time
2019-03-05 16:12:58 3 0 0 0.076923
2019-03-05 16:12:58 3 0 1 0.230769
2019-03-05 16:12:58 3 0 2 0.230769
2019-03-05 16:12:58 3 0 3 0.230769
2019-03-05 16:12:58 3 0 4 0.230769
%% Cell type:code id: tags:
``` python