Local Explanations for Top-N Recommendations
This note documents a Python implementation for generating local, feature-based explanations of individual recommendations. A Matrix Factorization (MF) model is trained with Cornac and used to rank candidate items for users represented in a held-out test split. For each recommended item, the code retrieves up to twenty items from the user's training history with the highest positive Jaccard similarity between genre profiles. Their observed training ratings are converted into binary like/dislike labels, and a shallow decision tree is trained on the corresponding item-genre features. The path followed by the recommended item's genre vector through this tree is then extracted as a set of human-readable decision conditions. The code reports the proportion of recommendations for which such a rule path is returned. This quantity is an operational explanation-coverage measure; it is not a predictive-accuracy measure or a direct measure of fidelity to the MF model. The implementation is prepared as tutorial material and is related to, but should not be considered identical to, the full methodology or software associated with the authors' 2026 publication.
Authors
- Raciel Yera (ORCID: https://orcid.org/0000-0001-9759-261X)
- Luis M. Martínez (ORCID: https://orcid.org/0000-0003-4245-8813)
- Álvaro Labella (ORCID: https://orcid.org/0000-0003-2764-1011)
- Oscar Ortega (ORCID: https://orcid.org/0009-0006-2850-6267)
Institutions
- Universidad de Jaén (ES)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-11
- DOI
- https://doi.org/10.5281/zenodo.24141243
- Primary Topic
- Explainable Artificial Intelligence (XAI)
- Type
- article
- Field-Weighted Citation Impact
- 0.00