> For the complete documentation index, see [llms.txt](https://docs.rhinofcp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rhinofcp.com/getting-started/quick-start-guide/federated-training-example-with-tabular-data.md).

# Federated Training Example with Tabular Data

Federated Training Example

Tabular data, such as electronic health records (EHR) or financial transaction data, can be used for both horizontal and vertical federated learning applications. In this article, we will use XGBoost to demonstrate the Federated Training flow.

XGBoost ([website](https://xgboost.readthedocs.io/en/stable/)) is a software library for training gradient-boosted trees for both classification and regression machine learning problems. It is widely accepted as a performant, cost-effective model for numeric and categorical tabular data applications.

In the Horizontal FL setting, each collaborator has distinct data samples (rows), and each row has the same set of features and is labeled. This contrasts with Vertical FL, in which only one collaborator possesses labels and the features may differ between collaborators’ datasets.

To implement Horizontal FL with [XGBoost](https://github.com/RhinoHealth/user-resources/blob/0b4916c11a61f8764d1b2ab8c077beb9437a94fc/examples/nvflare/xgboost/xgboost-fhe/README.md), users may take advantage of tree-based model collaboration.

### Tree-Based Collaboration

Tree-based federated XGBoost is implemented as the following (see Figure 1):

1. Each collaborator performs 1 round of XGBoost training on their own data
2. Each collaborator shares the learned tree with the FL Server
3. The FL Server bags the locally-trained trees to produce a global model
4. The global model is shared with each of the collaborators
5. Each collaborator performs 1 round of boosting to obtain a new tree, and repeats…

![](https://content.gitbook.com/content/ydySyCBmy6F7NnGn4bPa/blobs/B1JpZwPryMOVUWHX9vZc/26100731307421)

**Figure 1.** Illustrative schematic of tree-based collaboration for Federated XGBoost.

In this paradigm, only learned trees are ever shared with the FL Server/Rhino Orchestrator. The final set of aggregated trees (i.e., the final global model), can be stored on the FL server for future use (e.g., model evaluation on test sets and model inference).

For a comprehensive code example for how to implement Tree-Based XGBoost on the Rhino FCP, please visit our [user resources](https://github.com/RhinoHealth/user-resources/tree/main/tutorials/advanced/federated-training/xgboost-horizontal).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.rhinofcp.com/getting-started/quick-start-guide/federated-training-example-with-tabular-data.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
