Cost Function Linear Regression Python Code