A New Model for Counterfactual Analysis for Functional Data

Emilio Carrizosa, Jasone Ramírez-Ayerbe*, Dolores Romero Morales

*Corresponding author for this work

Research output: Contribution to journalJournal articleResearchpeer-review

25 Downloads (Pure)


Counterfactual explanations have become a very popular interpretability tool to understand and explain how complex machine learning models make decisions for individual instances. Most of the research on counterfactual explainability focuses on tabular and image data and much less on models dealing with functional data. In this paper, a counterfactual analysis for functional data is addressed, in which the goal is to identify the samples of the dataset from which the counterfactual explanation is made of, as well as how they are combined so that the individual instance and its counterfactual are as close as possible. Our methodology can be used with different distance measures for multivariate functional data and is applicable to any score-based classifier. We illustrate our methodology using two different real-world datasets, one univariate and another multivariate.
Original languageEnglish
JournalAdvances in Data Analysis and Classification
Number of pages20
Publication statusPublished - 25 Oct 2023

Bibliographical note

Epub ahead of print. Published online: 25 October 2023.


  • Counterfactual explanations
  • Mathematical optimization
  • Functional data
  • Prototypes
  • Random forests

Cite this