In [6]:
import numpy as np
import pandas as pd

# visualization libraries
import matplotlib.pyplot as plt

# plot the visuals in ipython
%matplotlib inline

In [24]:
df = pd.read_csv('./nlr_data.txt', delim_whitespace=True, skipinitialspace=True)

x = np.arange(64) + 1
y = df['y']
y1 = 1778.341871 * x**0.9533227053
y2 = 1446.523183 * x + 1747.977868

ydiff = y1 - y
ysqrd = ydiff*ydiff
ysum = ysqrd.sum()
print ysum

plt.plot(df['x'], df['y'], 'r.')

plt.plot(x, y2, 'b-')
plt.show()


8134306.72837