---
title: "Model Training"
description: "Model training is the process of teaching an algorithm to learn from data to make predictions or decisions."
date: "2024-07-12"
author:
  name: "Yan Gao"
  position: "Research Scientist"
  website: "https://discuss.flower.ai/u/yan-gao/"
  github: "github.com/yan-gao-GY"
related:
  - text: "Federated Learning"
    link: "/glossary/federated-learning"
  - text: "Server"
    link: "/glossary/server"
  - text: "Client"
    link: "/glossary/client"
---

Model training is a core component of developing machine learning (ML) systems, where an algorithm learns from data to make predictions or decisions. A typical model training process involves several key steps: dataset preparation, feature selection and engineering, choice of model based on the task (e.g., classification, regression), choice of training algorithm (e.g. optimizer), and model iteration for updating its weights and biases to minimize the loss function, which measures the difference between the predicted and actual outcomes on the training data. The traditional ML model training process typically involves considerable manual effort, whereas deep learning (DL) offers an end-to-end automated process.

This approach assumes easy access to data and often requires substantial computational resources, depending on the size of the dataset and complexity of the model. However, large amounts of the data in the real world is distributed and protected due to privacy concerns, making it inaccessible for typical (centralized) model training. Federated learning (FL) migrates the model training from data center to local user ends. After local training, each participant sends only their model's updates (not the data) to a central server for aggregation. The updated global model is sent back to the participants for further rounds of local training and updates. This way, the model training benefits from diverse, real-world data without compromising individual data privacy.

#### Model training in Flower
Flower, a friendly FL framework, offers a wealth of model training examples and baselines tailored for federated environments. Please refer to the [examples](https://flower.ai/docs/examples/) and [baselines](https://flower.ai/docs/baselines/) documentation for more detailed information.
