skfolio/skfolio-missing-fallback-in-cv
| Rule | skfolio-missing-fallback-in-cv |
|---|---|
| Pack | skfolio |
| Severity | info |
| Fix | none, edit by hand |
| Library versions | skfolio 1.14.4 and later |
A skfolio convex optimizer can fail on one fold when the constraints or estimated inputs change.
cross_val_predict(MeanRisk(), returns, cv=walk)cross_val_predict(MeanRisk(fallback=EqualWeighted()), returns, cv=walk)What the rule reports
Section titled “What the rule reports”Only use a fallback that satisfies your portfolio requirements. If you opt into failed portfolios, account for missing predictions in evaluation.
Message
Section titled “Message”xpd prints this message with the issue. A name that starts with $ stands for code from your file.
Consider a fallback for skfolio cross-validation when a fold may be infeasible. Supply fallback= or handle failed predictions with raise_on_failure=False.Browse the other rules of the skfolio pack.