# Reframing

> Changes how the ML problem is expressed, often switching between regression and classification

- **Category**: Machine Learning
- **Subcategory**: Problem Framing and Model Structure
- **Canonical URL**: https://designpattern.fyi/machine_learning/reframing/

---

## Description
**Intent**: Address cases where the obvious framing of a task isn't the one that trains best or communicates best, particularly for skewed targets or when uncertainty matters more than point estimates.

**Context**: A highly skewed target can make regression unstable, and stakeholders sometimes need a distribution or confidence level rather than a single point estimate. The natural output type may not match the business need.

**Solution**: Change how the ML problem is expressed, most commonly by moving between regression and classification: discretize a continuous label into buckets and solve as multi-class classification, or treat a classification target as a continuous score to be thresholded later. Choose the framing based on data shape and downstream usage needs.



## Use Cases
- Converting regression to classification for heavily skewed targets
- Treating binary classification as continuous scoring for threshold tuning
- Providing confidence intervals through discretized probability buckets
- Any task where natural framing doesn't match business needs






## Trade-offs


### Advantages

- Can improve training stability for skewed distributions

- Better matches how outputs will actually be used downstream

- Provides uncertainty quantification through discretization

- Enables calibration-focused evaluation approaches




### Considerations & Drawbacks

- Discretization trades away precision

- Bucket boundaries require careful consideration

- May need conversion logic for downstream systems

- Different framing may require different evaluation metrics







---
**Reference**: [Original Source](https://github.com/GoogleCloudPlatform/ml-design-patterns)

