# Choosing a model

> Decide between time-series forecasting and tabular prediction, and see what each returns.

There are two models. Pick by the shape of your data and the question you are asking.

| You have | You want | Use |
|---|---|---|
| Values over time: sales, load, traffic, sensor readings | What comes next, with a range | **ChakraTS**: [`yh.forecast`](https://yhatlabs.com/models/docs/time-series/forecasting) |
| The same, plus things you know ahead (prices, weather, promotions) | A forecast that uses them | **ChakraTS** with [`known=`](https://yhatlabs.com/models/docs/time-series/covariates) |
| Recent values over time | Which points were unusual | **ChakraTS**: [`yh.detect_anomalies`](https://yhatlabs.com/models/docs/time-series/anomalies-and-gaps) |
| Rows with an answer column (churned, price, diagnosis) | The answer for new rows | **ChakraTab**: [`yh.fit(...).predict(...)`](https://yhatlabs.com/models/docs/tabular/predicting) |
| A table with empty cells | The most likely values | **ChakraTab**: [`yh.impute`](https://yhatlabs.com/models/docs/tabular/imputation) |

## Time series or a table?

- **Time series:** the order of the rows matters, and the question is "what happens next". Each series is a column of values
  at regular times.
- **Table:** each row stands on its own, and the question is "what is the answer for this row".

Some problems could be either. Predicting which customers churn next month is a **table**: each customer is a row with
features. Forecasting how many customers churn per month is a **time series**: one value per month.

## What each returns

| | ChakraTS | ChakraTab |
|---|---|---|
| Best guess | the median for every future step | a class, or a number |
| Uncertainty | intervals at any level for every step, and sample paths | class probabilities and prediction sets, or a per-row distribution with intervals at any level |
| Checking it | backtests and calibration | accuracy on held-out rows, column importance |
| State | nothing is stored | one-shot, or a stored fit you predict from repeatedly |

Details, limits and benchmark results: [ChakraTS](https://yhatlabs.com/models/docs/models/chakra-ts), [ChakraTab](https://yhatlabs.com/models/docs/models/chakra-tab).
