In [1]:
import matplotlib
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from tornado import gen
from tornado.ioloop import IOLoop
from aimetrics import metrics
%matplotlib inline

In [2]:
with open("data/report_01.json") as f:
    data_json = f.read()

In [4]:
import json
metric_data = json.loads(data_json)

In [11]:
drone_roc = []
for m in metric_data:
    drone_roc.append(m['roc']['small drone'])

In [25]:
plt.figure(figsize=(12,12))
for r in drone_roc:
    plt.plot(r["fpr"], r["tpr"])
plt.plot([0, 1], [0,1], 'k--')
plt.xlim([-0.05, 1.0])
plt.ylim([0.0, 1.05])
plt.xlabel('False Positive Rate')
plt.ylabel('True Positive Rate')
plt.title('BNN Drone Cross-val ROC Curves')


Out[25]:
<matplotlib.text.Text at 0x7f08725a5ef0>

In [14]:
person_roc = []
for m in metric_data:
    person_roc.append(m['roc']['person'])

In [ ]:
person_roc

In [24]:
plt.figure(figsize=(12,12))
for r in person_roc:
    plt.plot(r["fpr"], r["tpr"])
plt.plot([0, 1], [0,1], 'k--')
plt.xlim([-0.05, 1.0])
plt.ylim([0.0, 1.05])
plt.xlabel('False Positive Rate')
plt.ylabel('True Positive Rate')
plt.title('BNN Person Cross-val ROC Curves')


Out[24]:
<matplotlib.text.Text at 0x7f087246ac18>

In [30]:
accuracies = []
for m in metric_data:
    accuracies.append(m['acc'])
accuracies = pd.Series(accuracies)
accuracies.describe()


Out[30]:
count    5.000000
mean     0.874286
std      0.039641
min      0.828571
25%      0.842857
50%      0.871429
75%      0.914286
max      0.914286
dtype: float64

In [ ]: