—Cross-project defect prediction (CPDP) makes use of cross-project (CP) data to overcome the lack of data necessary to train well-performing software defect prediction (SDP) classifiers in the early stage of new software projects. Since the CP data (known as the source) may be different from the new project’s data (known as the target), this makes it difficult for CPDP classifiers to perform well. In particular, it is a mismatch of data distributions between source and target that creates this difficulty. Transfer learning-based CPDP classifiers are designed to minimize these distribution differences. The first Transfer learning-based CPDP classifiers treated these differences equally, thereby degrading prediction performance. To this end, recent research has proposed the Weighted Balanced Distribution Adaptation (W-BDA) method to leverage the importance of both distribution differences to improve classification performance. Although W-BDA has been shown to improve model performance in CPDP, research to date has failed to consider model performance in light of increasing target data or variances in data sampling. We provide the first investigation of when and to what extent the effect of increasing the target data and using various sampling techniques have when leveraging the importance of both distribution differences. We extend the initial W-BDA method and call this extension the W-BDA+‘ method. To evaluate the effectiveness of W-BDA+‘ for improving CPDP performance, we conduct eight experiments on 18 projects from four datasets where data sampling was performed with different sampling methods. We evaluate our method using four complementary indicators (i.e., Balanced Accuracy, AUC, F-measure and G-Measure). Our findings reveal an average improvement of 6%, 7.5%, 10% and 12% for these four indicators when W-BDA+‘ is compared to five other baseline methods (including W-BDA), for all four of the sampling methods used. Also, as the target to source ratio is increased with different sampling methods, we observe a decrease in performance for the original W-BDA, with our W-BDA+ approach outperforming the original W-BDA in most cases. Our results highlight the importance of adjusting for data imbalance and having an awareness of the effect of the increasing availability of target data in CPDP scenarios.
Soil’s pivotal role in environmental and agricultural processes underscores the importance of accurate soil property predictions for informed decisions and sustainable land management. Spectroscopic techniques, particularly mid-infrared (MIR) spectroscopy, have emerged as rapid and non-destructive tools for soil analysis. Despite advances in predicting soil properties using spectroscopy, quantifying prediction uncertainties has often been overlooked. Accurate uncertainty quantification helps risk assessment and decision-making processes. This study introduces an enhanced version of the variational inference technique to capture uncertainty when using Bayesian Convolutional Neural Networks (Bayesian CNNs). This Bayesian CNNs method was evaluated against two other methods — Bootstrapped Partial Least-Squares regression (Bootsrapped PLS) and Generalised Additive Models (GAM) for their ability to quantify uncertainty in six soil property predictions (clay, sand, silt, pH, phosphorus retention, and carbon) based on MIR spectroscopy. In terms of predictive performance and quality of prediction, our evaluation indicated that both GAMs and Bayesian CNNs outperformed PLS-BS for all six soil properties. The ability of GAMs and Bayesian CNNs to capture non-linear relationships in the data allowed for better fitting to the underlying patterns. Bayesian CNNs, in particular, demonstrated superior performance by combining accurate predictions with robust uncertainty quantification. Our results also showed that, on our dataset, bootstrapping failed to provide satisfactory prediction intervals. We suggest therefore that the evaluation of models should extend beyond standard validation metrics, which typically focuses on prediction accuracy, to include an assessment of the predicted uncertainty.
Convolutional neural networks (CNNs) performance requires tuning of network architectures, which requires machine learning knowledge and significant time and effort. Thus, modern deep CNN in soil spectroscopy faces a major barrier as a result of this process. The components in convolutional neural networks (CNNs) for spectroscopic modelling are usually set heuristically before turning the hyperparameters. This can lead to poorly designed CNN models that are not fully optimised, or to models that take a long time to train to derive the optimal model. Although recent work has shown the importance of tuning the CNN hyperparameters, few studies have sought to tune the CNN components and hyperparameters concurrently. We propose such an approach when designing CNNs for soil spectroscopy, and test its effectiveness with the LUCAS soil library and dataset from the Kellogg Soil Survey Laboratory database. This approach has two phases. First, we automated the process of building the fully connected network which involved automating the selection of the different types of layers and the number of neurons per layer. In the second stage, we automated the selection of the hyperparameters for the network layers, and we experimented with two strategies for selecting the best combination. The first strategy involved adapting the population-based training (PBT) technique by replacing the random search used in PBT with a Bayesian optimisation method, which we call adapted-PBT. In the second strategy, we employed the Bayesian optimisation method. Our study revealed that our adapted-PBT was able to achieve high model performance when compared to using Bayesian optimisation in the second stage when predicting soil texture properties for all three predictive measures used (model efficiency coefficient (MCE), Root Mean Squared Error (RMSE), and the ratio of performance to interquartile range (RPIQ)). The results from our modelling were compared with two recent CNN studies that had used the LUCAS dataset and evaluated using the MCE, RMSE and RPIQ. This comparison indicated improvements (5% to 37%) in performance for all three soil properties (sand, silt and clay) in all performance metrics. These findings provide new insights that could help advance the use of CNNs in soil spectroscopy modelling by concurrently combining the building of the CNN components with tuning the hyperparameters.
Data sparsity is a challenge facing most modern recommendation systems. With cross-domain recommendation technique, one can overcome data sparsity by leveraging knowledge from relevant domains. This approach can be further enhanced by considering the latent sentiment information. However, as this latent sentiment information is derived from both relevant and irrelevant sources, the performance of the recommendation system may decline. This is a negative transfer (NT) problem, wheretheknowledgethatisderivedfrommultiplesourcesaffectsthesystem. Also, thesesourcedomainsareoftenimbalanced, which could further hurt the performance of the recommendation system. To this end, recent research has shown that NT is caused by domain divergence, source and target quality, and algorithms that are not carefully designed to utilise the target data to improve the domain transferability. While various research works have been proposed to prevent NT, these address only some of the factors that may lead to NT. In this paper, we propose a more systematic and comprehensive approach to overcoming NT in sentiment analysis by tackling the main causes of NT. Our approach combines the use of cost weighting learning, uncertainty-guided (aleatoric and epistemic) loss function over the target dataset, and the concept of importance sampling, to derive a robust model. Experimental results on a sentiment analysis task using Amazon review datasets validate the superiority of our proposed method when compared to three other state-of-the-art methods. To disentangle the contributions behind the success of both uncertainties, we conduct an ablation study exploring the effect of each module in our approach. Our findings reveal that we can improve a sentiment analysis task in a transfer learning setting from 4% to 10% when combining both uncertainties. Our outcomes show the importance of considering all factors that may lead to NT. These findings can help to build an effective recommendation system when including the latent sentiment information.
Stack Overflow is used to solve programming issues during software development. Research efforts have looked to identify relevant content on this platform. In particular, researchers have proposed various modelling techniques to predict acceptable Stack Overflow answers. Less interest, however, has been dedicated to examining the performance and quality of typically used modelling methods with respect to the model and feature complexity. Such insights could be of practical significance to the many practitioners who develop models for Stack Overflow. This study examines the performance and quality of two modelling methods, of varying degree of complexity, used for predicting Java and JavaScript acceptable answers on Stack Overflow. Our dataset comprised 249,588 posts drawn from years 2014-2016. Outcomes reveal significant differences in models’ performances and quality given the type of features and complexity of models used. Researchers examining model performance and quality and feature complexity may leverage these findings in selecting suitable modelling approaches for Q&A prediction.
In traditional machine learning environments, the use of non-parametric error estimation to set the discriminative threshold of a classifier to achieve the best accuracy is very effective. This method is not effective in a transfer learning environment because it is only reliable when both the training and testing data have similar distributions which is not the case in a transfer learning setting. Although the use of control variate techniques has been proposed to exploit the information about the error in the training sample to reduce the error in the test sample, this method yields a finite variance and the model uncertainty is not distributed among the variance. In this paper, we proposed and test a new transfer learning validation method called control linear minimum mean-squared error (CLMMSE) for source model selection under homogeneous transfer learning settings with the absence of an adequate pre-trained source model. Our approach adopts the Bayesian linear minimum mean-squared error (LMMSE) and integrates the idea of importance sampling into a control variate approach to provide an accurate estimate for the LMMSE that is then used to select the optimal source model. By combining importance sampling with the control variate technique to reduce further the variance, we can achieve a much tighter bound with the LMMSE. This approach reduces the risk in the target domain under data shift. Experimental results on synthetic data under two data shift settings demonstrate the efficacy of our approach. A further experiment on two real-world datasets shows that we were able to improve the accuracy of two state-of-the-art models tested; Bert (0.94\% to 65\%) and CodeBERT (1.82\% to 18.2\%) when compared to using previous selection methods.
Cross-project defect prediction (CPDP) models are used in new software project prediction tasks to improve defect prediction rates. The development of these CPDP models could be challenging in cases where there is little or no historical data. For this reason, researchers may need to rely on multiple sources and use transfer learning-based CPDP for building defect prediction models. These data are typically taken from similar and related projects, but their distributions can be different from the new software project (target data). Although, transfer learning-based CPDP models are designed to handle these distribution differences, but if not correctly handled by the model, may lead to negative transfer. To this end, recent works have focused on building transfer CPDP models, but little is known about how similar or dissimilar sources should be to avoid negative transfer. This paper provides the first empirical investigation to understand the effect of combining different sources with different levels of similarities in transfer CPDP. We introduce the use of the Population Stability Index (PSI) to interpret whether the distribution of the combined or single-source data is similar to the target data. This was validated using an adversarial approach. Experimental results on three public datasets reveal that when the source and target distribution are very similar, the probability of false alarm is improved by 3% to 7% and the recall indicator is reduced from 1% to 8%. Interestingly, we also found that when dissimilar source data are combined with different source datasets, the overall domain divergence is lowered, and the performance is improved. The results highlight the importance of using the right source to aid the learning process.
Computational geometry algorithms and data structures are widely applied across numerous scientific domains, and there a variety of R packages that implement computational geometry functionality. However, these packages often work in specific numbers of dimensions, do not have directly compatible data structures, and include additional non-computational geometry functionality that can be domain specific. Our objective in developing the compGeometeR package is to implement in a generic and consistent framework the most commonly used combinatorial computational geometry algorithms so that they can be easily combined and integrated into domain specific scientific workflows. We briefly explain the discrete and digital combinatorial computational geometry algorithms available in compGeometeR, and identify priorities for future development.
Context: Stack Overflow is a popular community question and answer portal used by practitioners to solve problems during software development. Developers can focus their attention on answers that have been accepted or where members have recorded high votes in judging good answers when searching for help. However, the latter mechanism (votes) can be unreliable, and there is currently no way to differentiate between an answer that is likely to be accepted and those that will not be accepted by looking at the answer's characteristics. Objective: In potentially providing a mechanism to identify acceptable answers, this study examines the features that distinguish an accepted answer from an unaccepted answer. Methods: We studied the Stack Overflow dataset by analyzing questions and answers for the two most popular tags (Java and JavaScript). Our dataset comprised 249,588 posts drawn from 2014-2016. We use random forest and neural network models to predict accepted answers, and study the features with the highest predictive power in those two models. Results: Our findings reveal that the length of code in answers, reputation of users, similarity of the text between questions and answers, and the time lag between questions and answers have the highest predictive power for differentiating accepted and unaccepted answers. Conclusion: Tools may leverage these findings in supporting developers and reducing the effort they must dedicate to searching for suitable answers on Stack Overflow.