Commit 31fa1851 authored by Andreas Schmidt's avatar Andreas Schmidt
Browse files

Add evaluation and data for RTN2017 workshop.

parent e70b31d8
%% Cell type:markdown id: tags:
# Definitions
%% Cell type:code id: tags:
``` python
import numpy as np
import math
import pandas as pd
import collections
from operator import itemgetter
%matplotlib inline
import matplotlib.pyplot as plt
plt.rcParams["figure.figsize"] = (16,9)
plt.rcParams.update({'figure.autolayout': True})
from sklearn import datasets, linear_model
def _evaluate_file(fileName,kind,sender=False):
# Remove first line, as this is the dummy line for intermittently storing data.
df = pd.read_csv(fileName)[1:]
df = df[df["Kind"] == kind].drop(["Kind"],axis=1).set_index("SeqNo")
if sender:
df.drop(["LinkReceive_T",
"LinkReceive_C",
"PrrtDeliver_T",
"PrrtDeliver_C",
"SendFeedbackStart_T",
"SendFeedbackStart_C",
"SendFeedbackEnd_T",
"SendFeedbackEnd_C",
"DecodeStart_T",
"DecodeStart_C",
"DecodeEnd_T",
"DecodeEnd_C",
"HandlePacketStart_T",
"HandlePacketStart_C",
"HandlePacketEnd_T",
"HandlePacketEnd_C",
"CopyOutputStart_T",
"CopyOutputStart_C",
"CopyOutputEnd_T",
"CopyOutputEnd_C",
"PrrtReturnPackage_T",
"PrrtReturnPackage_C",