Giter VIP home page Giter VIP logo

Comments (5)

aangelopoulos avatar aangelopoulos commented on May 29, 2024

from conformal-prediction.

601SunG avatar 601SunG commented on May 29, 2024

Hi, thank you so much for the great work. I have a question regarding the notebook on conformal risk control.

in the notebook, you defined the risk optimization objective as

def lamhat_threshold(lam): return false_negative_rate(cal_sgmd>=lam, cal_gt_masks) - ((n+1)/n*alpha - 1/(n+1))

However, in section 4.3 of the paper, it is defined as α−B−αn, which means the denominator should be n. Why is it n+1 in the code? Thanks.

n is large, e.g. n = 500, so 1/(n+1) ≈ 1/n ?

from conformal-prediction.

aangelopoulos avatar aangelopoulos commented on May 29, 2024

Ah - sorry, don't want to leave this unfinished. Actually, it should be true with equality, and I think you may have caught a bug. Here's the derivation:

(n+1)/n*alpha - 1/n
= alpha + (1/n)alpha - 1/n
= alpha - ((1-alpha)/n)

So, you're right! Thanks so much!

Maybe you should make a PR? That way you'll get some credit 😀

Otherwise if I don't hear from you, I'll just fix it myself soon. Thanks so much again!!

from conformal-prediction.

601SunG avatar 601SunG commented on May 29, 2024

Ah - sorry, don't want to leave this unfinished. Actually, it should be true with equality, and I think you may have caught a bug. Here's the derivation:

(n+1)/n*alpha - 1/n = alpha + (1/n)alpha - 1/n = alpha - ((1-alpha)/n)

So, you're right! Thanks so much!

Maybe you should make a PR? That way you'll get some credit 😀

Otherwise if I don't hear from you, I'll just fix it myself soon. Thanks so much again!!

Thanks Anastasios, but I think you made a typo, the derivation should start from (n+1)/n*alpha - 1/(n+1), as shown in code

from conformal-prediction.

aangelopoulos avatar aangelopoulos commented on May 29, 2024

I was proving that the code is wrong! 😀

It should be what I said in my message. The expression I started with is the correct version.

from conformal-prediction.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.