utils.py
def calc_metrics_regression(actual, predicted, digits=3):
    '''
    returns a dictionary of regression metrics calculated from input numpy arrays of actual and predicted values
    :param actual:
    :param predicted:
    :param digits:
    :return:
    '''

    R2_score = round(explained_variance_score(actual, predicted), digits)
    mae = round(mean_absolute_error(actual, predicted), digits)
    mse = round(mean_squared_error(actual, predicted), digits)
    rmse = round(sqrt(mean_squared_error(actual, predicted)), digits)
    corr = round(np.corrcoef(predicted, actual)[0, 1], digits)
    return({'mae': mae,
            'mse': mse, 'rmse': rmse,
            'corr': corr, 'R2_score': R2_score})

    returns a dictionary of regression metrics calculated from input numpy arrays of actual and predicted values
    :param actual:
    :param predicted:
    :param digits:
    :return:
    
returns a dictionary of regression metrics calculated from input numpy arrays of actual and predicted values
returns a dictionary of regression metrics calculated from input numpy arrays of actual and predicted values
def calc_metrics_regression(actual, predicted, digits=3):
    R2_score = round(explained_variance_score(actual, predicted), digits)
    mae = round(mean_absolute_error(actual, predicted), digits)
    mse = round(mean_squared_error(actual, predicted), digits)
    rmse = round(sqrt(mean_squared_error(actual, predicted)), digits)
    corr = round(np.corrcoef(predicted, actual)[0, 1], digits)
    return({'mae': mae,
            'mse': mse, 'rmse': rmse,
            'corr': corr, 'R2_score': R2_score})
def calc_metrics_regression ( actual , predicted , digits = 3 ) : R2_score = round ( explained_variance_score ( actual , predicted ) , digits ) mae = round ( mean_absolute_error ( actual , predicted ) , digits ) mse = round ( mean_squared_error ( actual , predicted ) , digits ) rmse = round ( sqrt ( mean_squared_error ( actual , predicted ) ) , digits ) corr = round ( np . corrcoef ( predicted , actual ) [ 0 , 1 ] , digits ) return ( { 'mae' : mae , 'mse' : mse , 'rmse' : rmse , 'corr' : corr , 'R2_score' : R2_score } )
returns a dictionary of regression metrics calculated from input numpy arrays of actual and predicted values
returns a dictionary of regression metrics calculated from input numpy arrays of actual and predicted values
'''
    returns a dictionary of regression metrics calculated from input numpy arrays of actual and predicted values
    :param actual:
    :param predicted:
    :param digits:
    :return:
    '''
None
actual
None
predicted
None
digits
None