Fuzzy Clustering and Data Analysis in PythonThe fuzzyclust toolbox

Preface

This book is about clustering with fuzzy partitions and about what can be built on it: validity indices that estimate how many groups a data set contains, projections that make a high-dimensional partition visible, prototypes that are lines, shells, or local models, graphs that replace the prototype altogether, and clustering-based identification of dynamic systems and segmentation of time series. The last chapters carry the same machinery over to relational, categorical, incomplete, very large, and image data, and to partial supervision, co-clustering, collaborative clustering, and cluster ensembles. All of it is implemented in fuzzyclust, an open-source Python package with a scikit-learn interface, and every figure in the book that shows a computed result is produced by one of its example scripts.

Who the book is for. It is written for engineers, data scientists, and graduate students who know k-means and want to understand what fuzzy clustering adds, why the Gustafson–Kessel and Gath–Geva algorithms detect cluster shapes that fuzzy c-means cannot, and how a cluster becomes a rule of a Takagi–Sugeno model or a segment of a process record. The mathematics requires no more than linear algebra and elementary calculus; every algorithm is stated in a box, summarized in a few bullets, and demonstrated on data whose structure is known. Readers who only want to use the toolbox can skip the theory sections and read the Using it in fuzzyclust and Examples sections of each chapter; readers interested only in the methods can skip the code.

The toolbox and its predecessor. fuzzyclust is the Python successor of the Fuzzy Clustering and Data Analysis Toolbox for MATLAB, written in 2005 by Balázs Balaskó, Balázs Feil, and the author. The MATLAB toolbox accompanied the book Cluster Analysis for Data Mining and System Identification and served the author’s research group at the University of Pannonia as the engine of a long line of work on clustering-based modeling, visualization, and time-series analysis. Its core—the partitioning algorithms, the validity indices, and the projection methods—maps function by function onto the Python package (chapter B). The research threads that grew around it are collected in the later chapters and in the sub-packages models, timeseries, viz, and graph; further sub-packages add methods from the wider literature.

How to run the examples. The package is installed with pip install fuzzyclust. The scripts that produce the figures are in the examples/ directory of the repository, grouped into folders by topic, and are listed in chapter C. The sphinx-gallery extension renders them as the online gallery of the documentation and converts them into Jupyter notebooks that run in the browser on Binder or Google Colab, so every experiment in the book can be rerun and modified without a local installation. Apart from a few short listings, the code snippets printed in the chapters are extracted from the same scripts and therefore run with the version of the toolbox that the book describes.

Acknowledgments. Much of the design of the MATLAB toolbox, written with Balázs Balaskó and Balázs Feil, survives in the Python package. Many methods of the later chapters were developed with co-authors to whom the author is deeply indebted: Robert Babuška, Ferenc Szeifert, Sándor Németh, Péter Árva, Annamária Kovács, Sándor Migály, Daniela Girimonte, Ágnes Vathy-Fogarassy, and Tamás Kenesei; their papers are cited in the Further reading sections of the chapters. The author acknowledges the support of the OTKA 143482 project of the National Research, Development and Innovation Office (NKFIH), Hungary.

Veszprém, November 2026 János Abonyi