In [1]:
import pandas as pd
import numpy as np
import solution

In [2]:
df = solution.get_train_df()

In [3]:
import matplotlib.pyplot as plt
%matplotlib inline

In [4]:
df.sort_values('charge_time').plot(
    x='charge_time', y='charge_last', ylim=[0, 9])


Out[4]:
<matplotlib.axes._subplots.AxesSubplot at 0x10e4d7290>

In [5]:
predict = solution.predictor(df)
predicted = {v: predict(v) for v in np.arange(0.1, 10.0, 0.15)}

dfp = pd.DataFrame(predicted.items(), columns=['charge_time', 'charge_last'])

In [6]:
dfp.sort_values('charge_time').plot(
    x='charge_time', y='charge_last', ylim=[0, 9])


Out[6]:
<matplotlib.axes._subplots.AxesSubplot at 0x10e506610>