machine-learning Definition R2 R2=1−∑i=1N(yi−yˉi)2∑i=1N(yi−y^i)2∈[0,1] where y^i denotes a predicted value and yˉ the mean of the y dataset. R2=1 means “theoretically perfect” and R2=0 means pretty bad.