Dimensionality reduction and machine learning based model of software cost estimation

Wei Zhang, Haixin Cheng, Siyu Zhan, Ming Luo, Wang Feng, Zhan HuangFrontiers in Physics 2024

Abstract

Software Cost Estimation (SCE) is a critical challenge in the construction of cyber-physical-social systems (CPSSs). Accurate processing of environmental and social information is essential to guide social practice. This paper proposes a novel SCE model that integrates Autoencoders for nonlinear dimensionality reduction with an XGBoost-based Random Forest for prediction. By preprocessing project data to handle missing values and outliers, and then compressing features into a lower-dimensional latent space, the model achieves superior accuracy and robustness. Validation on the COCOMO81, Albrecht, and Desharnais datasets demonstrates significant improvements over traditional methods, with the COCOMO81 dataset yielding a Mean Magnitude of Relative Error (MMRE) of 0.21 and a PRED(0.25) of 0.71.

Introduction

Software Cost Estimation (SCE) is notoriously difficult. In the early stages of a project, requirements are often vague, yet managers need precise estimates to allocate resources and manage risks. Traditional linear models and manual estimations often fail to capture the complex, non-linear relationships between project attributes—such as team experience or software complexity—and the final cost. This leads to significant budget overruns or project failures. This paper introduces a hybrid machine learning model designed to accurately predict software development costs, even when working with small or "noisy" datasets.

Methodology

The proposed approach utilizes a multi-stage pipeline to clean, compress, and model project data:

Data Preprocessing

Instead of simply deleting projects with missing data, the authors used linear regression trees to predict and fill in missing attributes based on other available variables. Box plots were also employed to identify and remove statistical outliers, ensuring the training data remained high-quality.

Nonlinear Dimensionality Reduction

The core innovation of this research is the use of an Autoencoder for dimensionality reduction. While common methods like Principal Component Analysis (PCA) are limited to linear relationships, an Autoencoder—a type of neural network—can compress input features into a lower-dimensional "latent space" that captures complex, hidden correlations.

Structure of the Autoencoder used for dimensionality reduction.

By finding the "inflection point" in data variance, the researchers settled on 6 key factors that explain 81% of the data variance, significantly reducing the noise and redundancy inherent in high-dimensional software engineering datasets.

Prediction via XGBoost-based Random Forest

For the final prediction, the team utilized the XGBoost framework to implement a Random Forest model. XGBoost provides high performance and speed, while the Random Forest architecture offers excellent generalization, preventing the model from "overfitting" to the relatively small training sets typical in software engineering.

Experimental Results

The model was validated on three classic software engineering benchmarks: COCOMO81 (63 projects), Albrecht (24 projects), and Desharnais (81 projects). The proposed model significantly outperformed existing deep learning and optimization-based models (such as HACO-BA and PSO-FLANN).

On the COCOMO81 dataset, the results were particularly strong:

  • MMRE (Mean Magnitude of Relative Error): 0.21. This indicates an average error of only 21%.
  • MdMRE (Median MRE): 0.16. The lower median error suggests high consistency across predictions.
  • PRED(0.25): 0.71. This means 71% of the model's predictions fell within 25% of the actual project cost.

Discussion and Interpretability

One common criticism of neural networks is their "black box" nature. To address this, the authors mapped the 6 reduced factors back to practical project management concepts, such as "Personnel development capability" and "Software scale." This helps managers understand the underlying drivers of a cost estimate. Furthermore, the model proved robust even on the tiny Albrecht dataset (only 21 training samples), demonstrating its suitability for data-starved environments.

Conclusion

The integration of Autoencoders for dimensionality reduction and XGBoost for prediction offers a powerful new tool for software project management. While future work is needed to better handle ordinal attributes and imbalanced data (where very large projects are rare), this hybrid approach represents a significant step forward in achieving accurate and interpretable software cost estimates.

Summary updated

BibTeX
@inproceedings{zhang2024dimensionality,
  author = {Wei Zhang and Haixin Cheng and Siyu Zhan and Ming Luo and Wang Feng and Zhan Huang},
  title = {{Dimensionality reduction and machine learning based model of software cost estimation}},
  booktitle = {Frontiers in Physics},
  year = {2024},
  doi = {10.3389/fphy.2024.1324719},
}
Figure