Cover of Federated Learning in Practice
Data & research

Federated Learning in Practice

A Practitioner's Guide with Python and R

Explore federated learning through a practitioner's perspective using Python and R. Connect the ideas behind collaborative model training with practical implementation, while considering how data can remain distributed.

View on Amazon ↗

Opens Amazon in a new tab. Check the listing for formats and availability.

A closer look

About this book.

Train models across data that cannot be brought into one place. Federated Learning in Practice is a hands-on guide for practitioners who already know how to train machine learning models and now need to work across distributed organisations or devices.

The book begins with the shared foundations: federated averaging, non-IID client data, privacy and security, and communication efficiency. You then build FedAvg from scratch in Python, explore Flower, and work through the practical challenges of evaluating and deploying federated systems.

A parallel R track develops a from-scratch FedAvg implementation, introduces federated statistics with DataSHIELD, and explores how R and Python workflows can work together. The book explains their different strengths rather than treating the two ecosystems as interchangeable.

A multi-site healthcare case study brings the tracks together, followed by evaluation, monitoring, and debugging. Written for readers comfortable with intermediate Python or R and the basics of machine learning, this guide connects the algorithms to the engineering decisions behind a working federated system.

Beyond the book

Reader resources.

Download chapter code (ZIP)

Includes a README with setup notes and a chapter-by-chapter file index.

Official documentation and guides for topics covered in this book.

← Back to the books