Python SDK
Score Models
SDK Reference: ML Readiness Score objects
The ML Readiness Score is a deterministic 0-100 score computed entirely from an existing ReviewResult. It never reads raw data: every dimension derives from the findings a reviewer already produced, so a given review always yields the same versioned score.
MLReadinessScore
@dataclass(frozen=True, slots=True)class MLReadinessScore: scoring_version: str # "0.3.0" overall: float # 0.0 to 100.0 dimensions: tuple[DimensionScore, ...] summary: str positive_findings: tuple[str, ...] negative_findings: tuple[RuleFinding, ...] def to_dict(self) -> dict[str, Any]: ...DimensionScore
@dataclass(frozen=True, slots=True)class DimensionScore: id: str label: str score: float weight: float rationale: str contributing_findings: tuple[RuleFinding, ...] suggested_actions: tuple[str, ...] def to_dict(self) -> dict[str, Any]: ...The Seven Effective Dimensions
Each dimension carries a uniform default weight of 1.0. Consolidated dimensions read from multiple review sections; the registered Class Balance dimension is never applicable until its minority-class detector ships:
| Dimension ID | Dimension | Backing Section(s) |
|---|---|---|
| score.schema_health | Schema Health | review.schema.health |
| score.missing_values | Missing Values | review.quality.missingness |
| score.feature_quality | Feature Quality | review.quality.feature_quality |
| score.distribution_health | Distribution Health | review.quality.basic_statistics |
| score.leakage_risk | Leakage Risk | review.leakage |
| score.data_quality | Data Quality | review.quality.duplicates + review.quality.constants |
| score.consistency | Consistency | review.schema.types + review.quality.cardinality |
score.class_balance (Class Balance) is registered but never applicable: the minority-class detector is not yet implemented, so it is omitted from the aggregate rather than silently counted as a perfect or zero score.
Scoring Formula
Each dimension starts at a perfect 100.0 and deducts a fixed, versioned amount per finding based on severity:
- Critical finding: -30.0 points
- Warning finding: -15.0 points
- Info finding: -5.0 points
Scores are clamped to [0, 100] and rounded to one decimal place. The overall score is the weighted average:
Inapplicable dimensions (whose backing section is absent) are omitted and their weights renormalized automatically, so a regression-only dataset is not penalized for classification-specific metrics.
Example
import featuresmith as fsresult = fs.review("data.csv", target_column="label")score = fs.score(result)if score: print(f"Overall: {score.overall}/100") for dim in score.dimensions: if dim.score < 100.0: print(f" {dim.label}: {dim.score}/100 - {dim.rationale}") print(f" Actions: {dim.suggested_actions}")