Inconsistent functions in ConformityScore class: seeking explanation #318
Replies: 2 comments
-
Discussed in #321. Feel free to delete this discussion, it seems that I can't do it. |
Beta Was this translation helpful? Give feedback.
-
Copy/paste the issue #321 to answer satisfactorily: Interest of this exceptionThis exception has been raised for several reasons. First of all, what is the motivation behind this exception?
Particular interpretation of your exceptionIn your case, this exception tells us that some of your data is having difficulty being recalculated with high precision in the If the error occurs about 15% of software executions, it's because you haven't defined a random seed: the random_state = 42
train, calib = train_test_split(data, test_size=0.25, shuffle=True, random_state=random_state) After all, I could assume that some of your data is extremely small or large compared to the computer precision and that this causes problems in the consistency check. Resolution of the exceptionBut don't worry, because the method proposed by MAPIE is mathematically valid, and this is an extreme error involving computer precision, we can manually remove this check. Here's the code to do just that: from mapie.conformity_score import AbsoluteConformityScore
my_conformity_score = AbsoluteConformityScore()
my_conformity_score.consistency_check = False
mapie = MapieRegressor(model, cv="prefit", conformity_score=my_conformity_score) ConclusionI admit I've never seen this kind of exception raised in this kind of situation. This is why the way to solve the issue is not aesthetic. But this issue could be the subject of a future readjustment to more easily control this parameter as soon as the object is initialised. I hope I've been able to help you solve your issue. Don't hesitate to let me know if the solution works for you. |
Beta Was this translation helpful? Give feedback.
-
Hey there! I was wondering if someone could kindly help me understand why I'm encountering the following issue:
I would greatly appreciate it if someone could shed some light on this matter and provide some insights or possible reasons behind this issue. Thank you so much!
Beta Was this translation helpful? Give feedback.
All reactions