Skip to content

Instantly share code, notes, and snippets.

View all.py
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
def hypothesis(x, θ):
hypothesis = np.matmul(θ.T, x)
return hypothesis
def loss_function(h_x, y):
loss_error = 1 /2 *(h_x - y) *(h_x - y)