Skip to content

Commit

Permalink
Fix #890: Add Jaime's model to AimodelSS, AimodelDataFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
trentmc committed Apr 30, 2024
1 parent 9e87b23 commit 780f7c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pdr_backend/aimodel/aimodel_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,11 @@ def build(
if do_constant or ss.calibrate_probs == "None":
pass
elif ss.calibrate_probs == "CalibratedClassifierCV_5x":
N = X.shape[0]
method = "sigmoid" if N < 200 else "isotonic"
cv = min(smallest_n, 5)
if cv > 1:
skm = CalibratedClassifierCV(skm, cv=cv)
skm = CalibratedClassifierCV(skm, method=method, cv=cv)
else:
raise ValueError(ss.calibrate_probs)

Expand Down

0 comments on commit 780f7c3

Please sign in to comment.