skfolio/skfolio-hierarchical-seriation
| Rule | skfolio-hierarchical-seriation |
|---|---|
| Pack | skfolio |
| Severity | error |
| Fix | unsafe, with xpd check --fix --unsafe-fixes |
| Library versions | skfolio 1.14.4 and later |
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(...).
Message
Section titled “Message”xpd prints this message with the issue. A name that starts with $ stands for code from your file.
skfolio HRP and Schur raise FutureWarning at fit for hierarchical_clustering_estimator. Put the clustering estimator inside HierarchicalSeriation.Browse the other rules of the skfolio pack.