def r_squared(alpha, beta, x, y):
 return (1.0 - (sum_of_squared_errors(alpha, beta, x, y) / total_sum_of_squares(y)))

def r_squared ( alpha , beta , x , y ) : return ( 1.0 - ( sum_of_squared_errors ( alpha , beta , x , y ) / total_sum_of_squares ( y ) ) )
the fraction of variation in y captured by the model .