skfolio/skfolio-hierarchical-seriation
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| skfolio | error | unsafe, with xpd check --fix --unsafe-fixes |
skfolio 1.14.4+ |
skfolio HRP and Schur configure their clustering through a HierarchicalSeriation estimator.
HierarchicalRiskParity(hierarchical_clustering_estimator=cluster)HierarchicalRiskParity(seriation_estimator=HierarchicalSeriation(hierarchical_clustering_estimator=cluster))What the rule reports
Section titled “What the rule reports”The rule covers the two constructors and the legacy fitted alias. HERC still accepts hierarchical_clustering_estimator. NCO accepts clustering_estimator.
How to fix it
Section titled “How to fix it”Use xpd check --fix for the fitted attribute hierarchical_clustering_estimator_ and xpd check --fix --unsafe-fixes to wrap hierarchical_clustering_estimator inside HierarchicalSeriation(...).
Diagnostic message
Section titled “Diagnostic message”skfolio HRP and Schur raise FutureWarning at fit for hierarchical_clustering_estimator. Put the clustering estimator inside HierarchicalSeriation.See all rules in the skfolio pack.