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

# Create & train a model

> How to train a model on your data to answer a fundraising question

Once your data is connected and mapped, you can train a model. A model learns from your **history** — past offers and responses — to predict what will happen next. You configure it once; you can then retrain it whenever your data refreshes.

> [!NOTE]
>
> Not sure which model to build? See [What Allyy can predict](https://docs.allyy.io/models/what-allyy-can-predict.md) for the catalogue and how to choose.

## Before you start

**1. Connected, mapped data**

The model trains on mapped data inside a dataset. In particular, **gift amounts**, **timestamps** and **response types** must be mapped correctly — they define what "success" means. See [Data mapping](https://docs.allyy.io/processes/data_mapping.md).

**2. Enough history**

Models learn patterns from the past, so they need a reasonable history of offers and responses. The more representative the history, the better the model.

## Training a model

**1. Create a model in your dataset**

Open the dataset and create a new model.

> [!NOTE]
>
> **Screenshot to add** — the model creation screen (creating a new model inside a dataset).

**2. Choose the question (model type)**

Pick what the model should predict — for example **DM propensity** (who will respond to a mailing) or **expected amount** (how much they'll give). This choice sets how Allyy defines the target and which signals it builds.

**3. Define the scope**

Tell Allyy which records the model should learn from and predict on — for example a particular campaign type, channel, or supporter segment.

**4. Let Allyy build the features**

Allyy assembles the model's inputs from your data using built-in **feature recipes** — recency and frequency of giving, gift-size trends, channel history, engagement, and more. You don't compute these by hand.

**5. Train**

Start training. Allyy fits the model on your history, tunes it, and validates it on held-out data so the reported performance reflects unseen supporters.

> [!NOTE]
>
> **Screenshot to add** — training in progress and a completed training run.

**6. Review performance**

When training finishes, review the model's quality before using it (see below).

## Is the model any good?

After training, Allyy reports how well the model separates likely responders from unlikely ones, and how its predictions break down. The clearest read is on the **model dashboards**, which compare the model's scores against what actually happened in past campaigns.

→ See [Model evaluation dashboards](https://docs.allyy.io/dashboards-evaluation/index) for how to read model performance, score groups, and the profit curve.

> [!TIP]
>
> A model doesn't have to be perfect to be useful — it has to be **better than your current selection**. The dashboards show exactly how much cost you can save (or income you can gain) versus contacting everyone.

## Retraining

As new data arrives, retrain the model so it stays current. You can do this manually, or schedule it with a [workflow](https://docs.allyy.io/automation/workflows.md) so it always trains on fresh data before each campaign.

## Next

> [card] [Generate predictions](https://docs.allyy.io/predictions/generating-predictions.md)
>
> Apply your trained model to a population to produce scores.

> [card] [Model evaluation](https://docs.allyy.io/dashboards-evaluation/index)
>
> Evaluate the model and see the impact of optimising your selection.


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