Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add metric adjusted r2 #27

Open
behrica opened this issue Apr 18, 2024 · 2 comments
Open

add metric adjusted r2 #27

behrica opened this issue Apr 18, 2024 · 2 comments
Labels
3.x enhancement New feature or request

Comments

@behrica
Copy link
Contributor

behrica commented Apr 18, 2024

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

@genmeblog
Copy link
Contributor

There is an omega-sq which is adjusted R2, I can't match results, something is wrong with it I suppose.

@genmeblog
Copy link
Contributor

Ok, I will add a third argument for degrees of freedom (features) to adjust r2. It will be in 3.x.

@genmeblog genmeblog added enhancement New feature or request 3.x labels Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants