import numpy as np

def L2(yhat,y):
    np_sum = np.sum((y - yhat) ** 2)
    return np_sum


yhat = np.array([.9, 0.2, 0.1, .4, .9])
y = np.array([1, 0, 0, 1, 1])
print("L2 = " + str(L2(yhat,y)))
5cee89f53970f090d30c87dc43efe16ff6367147
<mask token>


def L2(yhat, y):
    np_sum = np.sum((y - yhat) ** 2)
    return np_sum


<mask token>

<mask token>


def L2(yhat, y):
    np_sum = np.sum((y - yhat) ** 2)
    return np_sum


<mask token>
print('L2 = ' + str(L2(yhat, y)))

<mask token>


def L2(yhat, y):
    np_sum = np.sum((y - yhat) ** 2)
    return np_sum


yhat = np.array([0.9, 0.2, 0.1, 0.4, 0.9])
y = np.array([1, 0, 0, 1, 1])
print('L2 = ' + str(L2(yhat, y)))

import numpy as np


def L2(yhat, y):
    np_sum = np.sum((y - yhat) ** 2)
    return np_sum


yhat = np.array([0.9, 0.2, 0.1, 0.4, 0.9])
y = np.array([1, 0, 0, 1, 1])
print('L2 = ' + str(L2(yhat, y)))

import numpy as np

def L2(yhat,y):
    np_sum = np.sum((y - yhat) ** 2)
    return np_sum


yhat = np.array([.9, 0.2, 0.1, .4, .9])
y = np.array([1, 0, 0, 1, 1])
print("L2 = " + str(L2(yhat,y)))