> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mathfi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Regression by banding the target

> MathFi.ai is a classifier, but it handles continuous targets such as power output or price once you band them into classes. How to set that up, with a wind turbine example.

MathFi.ai trains classifiers. It does not predict a continuous number directly. You can still use it
for regression-type problems by converting the continuous target into ranges, one class per range,
and training a multi-class model on those.

The banding is done by you, in the CSV, before upload. The platform does not do it for you.

## Example: wind turbine power

Predict a turbine's power output, 0 to 2000 kW, from weather and operating readings.

### 1. Band the target

Replace the continuous power column with a class per 200 kW range:

| Power output | Class |
| - | - |
| 0–200 kW | `1` |
| 200–400 kW | `2` |
| ... | ... |
| 1800–2000 kW | `10` |

```csv theme={null}
id,wind_speed,wind_direction,rotor_rpm,ambient_temp,power_band
a41c02,7.8,212,14.1,11.3,4
b9e7d5,3.1,198,6.2,10.9,1
```

Apply the same bands to the train and test files. Every band needs at least 25 labelled rows, the
same as any class (see [Input data](/guides/input-csv-creation#sizes-and-limits)). If a band is too
sparse, widen it or merge it with a neighbour.

### 2. Train a multi-class model

Take the dataset to [Model Crucible](/products/model-crucible). Feature Refinery handles binary
targets only today, so a banded target skips refinement.

The prediction for each row is a band, for example `3`, meaning 400–600 kW.

### 3. Refine within a band, if you need more precision

A 200 kW band may be too coarse. To go finer:

1. Take the rows whose actual output falls in one band, say 400–600 kW.
2. Band that range again, for example ten 20 kW sub-bands.
3. Train a second model on those rows.
4. At prediction time, send rows the first model places in 400–600 kW to the second model.

Repeat for the bands where the extra precision is worth it.

## Things to watch

* **Band width is a trade.** Narrower bands give a more precise answer but fewer rows per class and
  a harder problem. Start coarse.
* **Bands are not buckets.** The platform's **Buckets** setting controls internal cross-validation
  and has nothing to do with how you band the target. See the [Glossary](/glossary).
* **Ordering is not modelled.** The classifier treats bands as separate labels. It does not know
  band 4 is closer to band 5 than to band 9.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.