Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

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)
Comment

PREVIOUS NEXT
Code Example
Python :: concate the dataframe in pandas.. 
Python :: Check instance has an attribute in python 
Python :: python get output 
Python :: index.py:14: RuntimeWarning: invalid value encountered in true_divide return np.dot(user, user2) / (norm(user) * norm(user2)) 
Python :: how to find min, max in dictionaries 
Python :: getting python class from string 
Python :: python radiobutton default value 
Python :: how to run mac terminal from python script 
Python :: python collection 
Python :: clear all value in set on python 
Python :: flask run development mode 
Python :: django form action 
Python :: django-tool-bar 
Python :: open python not write file 
Python :: list.add in python 
Python :: fillna with index 
Python :: sqlite database python 
Python :: python while variable is not 
Python :: list comprehension with square numbers python 
Python :: private attributes python 
Python :: how to mention a role discord.py 
Python :: python observer pattern 
Python :: check this id exist in database django 
Python :: python looping over a list 
Python :: django insert bulk data 
Python :: ssl socket python 
Python :: python cartesian coordinates code 
Python :: how to add hyperlink in jupyter notebook 
Python :: scikit learn random forest 
Python :: wkhtmltopdf pdfkit blocked access to file 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =