In [1]:
import numpy as np
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
matplotlib.style.use('ggplot')
%matplotlib inline
import os
In [47]:
df = pd.read_csv("sim_anneal.dat", sep=" ")
df = df[df.TIME < 15]
df.head()
Out[47]:
In [48]:
variance = df.groupby('GRAPH_SIZE').var()
variance
Out[48]:
In [52]:
plt.title('Evaluation time on full graphs')
median = df.groupby('GRAPH_SIZE').median()
plt.plot(median.index.values, median['TIME'])
max_var = variance['TIME'].max()
plt.text(200, 12, r'$S^2$ = ' + str(max_var))
plt.ylabel('time (sec)')
plt.xlabel('Full graph size')
plt.show()
In [50]:
plt.title('Related error by the full graph size')
plt.plot(median.index.values, median['RELATED_ERROR'])
plt.ylabel('Procent of error')
plt.xlabel('Full graph size')
max_var = variance['RELATED_ERROR'].max()
plt.text(200, 0.09, r'$S^2$ = ' + str(max_var))
plt.show()
In [ ]: