Skip to content

Commit

Permalink
adding a warning for the case of big shift size
Browse files Browse the repository at this point in the history
  • Loading branch information
mojtaba farmanbar committed Oct 3, 2023
1 parent 3d8dad4 commit d5dc09b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/conformal_models/transductive_regression.jl
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,10 @@ function partial_fit(
ŷₜ = _aggregate(ŷ, aggregate)
push!(conf_model.scores, @.(conf_model.heuristic(y, ŷₜ))...)
conf_model.scores = filter(!isnan, conf_model.scores)
if shift_size > length(conf_model.scores)
@warn "The shift size is bigger than the size of Non-conformity scores"
return conf_model.scores
end
conf_model.scores = conf_model.scores[(shift_size + 1):length(conf_model.scores)]
return conf_model.scores
end
Expand Down

0 comments on commit d5dc09b

Please sign in to comment.