def squared_loss(y_true, y_pred):
 return (((y_true - y_pred) ** 2).mean() / 2)

def squared_loss ( y_true , y_pred ) : return ( ( ( y_true - y_pred ) ** 2 ) . mean ( ) / 2 )
compute the squared loss for regression .