Open behrica opened 5 months ago
I came with this implementation;
(defn adj-r2 [lhs rhs p] (let [r2 (stats/r2 lhs rhs) n (count lhs)] (- 1 (* (- 1 r2) (/ (dec n) (- n p 1))))))
from here: https://en.wikipedia.org/wiki/Coefficient_of_determination#Adjusted_R2
There is an omega-sq which is adjusted R2, I can't match results, something is wrong with it I suppose.
omega-sq
Ok, I will add a third argument for degrees of freedom (features) to adjust r2. It will be in 3.x.
I came with this implementation;
from here: https://en.wikipedia.org/wiki/Coefficient_of_determination#Adjusted_R2