Horje
mean bias error Code Example
mean bias error
def MBE(y_true, y_pred):
    '''
    Parameters:
        y_true (array): Array of observed values
        y_pred (array): Array of prediction values

    Returns:
        mbe (float): Biais score
    '''
    y_true = np.array(y_true)
    y_pred = np.array(y_pred)
    y_true = y_true.reshape(len(y_true),1)
    y_pred = y_pred.reshape(len(y_pred),1)   
    diff = (y_true-y_pred)
    mbe = diff.mean()
    print('MBE = ', mbe)




Python

Related
how to read linux environment variable in python Code Example how to read linux environment variable in python Code Example
print command python Code Example print command python Code Example
No name 'QMessageBox' in module 'PyQt5.QtWidgets' Code Example No name 'QMessageBox' in module 'PyQt5.QtWidgets' Code Example
python read json file array Code Example python read json file array Code Example
updateview Code Example updateview Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8