[Conformal EEG] Neighborhood Conformal Prediction#824
Open
lehendo wants to merge 19 commits intosunlabuiuc:masterfrom
Open
[Conformal EEG] Neighborhood Conformal Prediction#824lehendo wants to merge 19 commits intosunlabuiuc:masterfrom
lehendo wants to merge 19 commits intosunlabuiuc:masterfrom
Conversation
jhnwu3
requested changes
Feb 6, 2026
Collaborator
jhnwu3
left a comment
There was a problem hiding this comment.
Just quick change, can we make sure to update the docs/ to include this new method? So when we do merge, it'll update the site to have it as an option?
EricSchrock
reviewed
Feb 7, 2026
siddharthal
requested changes
Feb 7, 2026
siddharthal
approved these changes
Feb 8, 2026
Collaborator
siddharthal
left a comment
There was a problem hiding this comment.
The updates on the NCP implementations look good to me!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Arjun Chatterjee
This an implementation of the neighborhood conformal prediction from the paper that Sid shared. Added a test file and changed some of the init files.
Main implementation:
Calibrate: Stores calibration embeddings and conformity scores (prob of true class). Fits a k-NN index on calibration embeddings. Optional cal_embeddings or batch_size for extraction.
Forward: One model call with embed=True. For each test embedding: k-NN in calibration space, weights = exp(-dist/λ_L) over k-NN and normalized, threshold = weighted α-quantile of calibration conformity scores, y_predset = (y_prob >= threshold) with correct batch handling.
Args: model, alpha, k_neighbors=50, lambda_L=100.0, debug=False.
Validation: alpha in (0,1), k_neighbors positive int, multiclass-only.
Fix #789