Enhancing Cross-Project Defect Prediction via Transfer Component Analysis and Hybrid Ensembles

In cross-project defect prediction (CPDP), divergence in feature distribution between the source and target often fails when predicting defects across unrelated projects. Such a mismatch is typical rather than exceptional in real deployment scenarios. To address this, the Transfer Component Analysis (TCA) technique projects the source and target into a shared subspace, where Maximum Mean Discrepancy is minimized. However, combining fixed ensemble classifiers with TCA on NASA datasets is yet to be explored. Previous studies either searched ensemble compositions adaptively or conflated alignment with source selection. In this study, we trained a two-layer hybrid ensemble of Bagging and AdaBoost classifiers, alongside a Logistic Regression meta-learner, on TCA-aligned features across 20 directed source–target pairs. We used five PROMISE datasets, each having 21 McCabe and Halstead features. Experiments were conducted, and the findings show that, against an unaligned baseline using the same ensemble, TCA alignment increased mean AUC by 0.131 (0.625 to 0.755), mean F1 by 0.155, and mean MCC by 0.125. Wilcoxon signed-rank tests confirmed significance across all three metrics (p < 0.003, rank-biserial r = 0.714, Cliff’s Delta d ≥ 0.545). A full ablation showed that alignment was the dominant contributor to performance, with TCA improving AUC by +0.131 over the unaligned baseline. In contrast, SMOTE traded a small AUC reduction (−0.014) for substantial F1 gains (+0.134), while the stacking layer provided modest improvements in F1 and MCC. TCA reduced MMD across all 20 source–target pairs by a mean of 83.3%. Sensitivity analysis further showed that the TCA subspace dimensionality parameter, k, exhibited non-monotone, pair-specific AUC sensitivity, with optimal values ranging from 5 to 30. These findings indicate that alignment parameter selection substantially influences CPDP performance and that a fixed global default is inadequate.

Authors

Institutions

Publication Details

Journal
Software
Published
2026-08-18
DOI
https://doi.org/10.3390/software5030035
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Enhancing Cross-Project Defect Prediction via Transfer Component Analysis and Hybrid Ensembles

Bassey Isong
Software
Software Engineering Research
article

Enhancing Cross-Project Defect Prediction via Transfer Component Analysis and Hybrid Ensembles

Bassey Isong
article en

Abstract

In cross-project defect prediction (CPDP), divergence in feature distribution between the source and target often fails when predicting defects across unrelated projects. Such a mismatch is typical rather than exceptional in real deployment scenarios. To address this, the Transfer Component Analysis (TCA) technique projects the source and target into a shared subspace, where Maximum Mean Discrepancy is minimized. However, combining fixed ensemble classifiers with TCA on NASA datasets is yet to be explored. Previous studies either searched ensemble compositions adaptively or conflated alignment with source selection. In this study, we trained a two-layer hybrid ensemble of Bagging and AdaBoost classifiers, alongside a Logistic Regression meta-learner, on TCA-aligned features across 20 directed source–target pairs. We used five PROMISE datasets, each having 21 McCabe and Halstead features. Experiments were conducted, and the findings show that, against an unaligned baseline using the same ensemble, TCA alignment increased mean AUC by 0.131 (0.625 to 0.755), mean F1 by 0.155, and mean MCC by 0.125. Wilcoxon signed-rank tests confirmed significance across all three metrics (p < 0.003, rank-biserial r = 0.714, Cliff’s Delta d ≥ 0.545). A full ablation showed that alignment was the dominant contributor to performance, with TCA improving AUC by +0.131 over the unaligned baseline. In contrast, SMOTE traded a small AUC reduction (−0.014) for substantial F1 gains (+0.134), while the stacking layer provided modest improvements in F1 and MCC. TCA reduced MMD across all 20 source–target pairs by a mean of 83.3%. Sensitivity analysis further showed that the TCA subspace dimensionality parameter, k, exhibited non-monotone, pair-specific AUC sensitivity, with optimal values ranging from 5 to 30. These findings indicate that alignment parameter selection substantially influences CPDP performance and that a fixed global default is inadequate.

SoftwareVol. 5(3)
North-West University (ZA)
Openalex Percentile: Top 3%
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.