E-commerce refers to a system that allows individuals to purchase and sell things online. The primary goal of e-commerce is to offer customers the convenience of not going to a physical store to make a purchase. They will purchase the item online and have it delivered to their home within a few days. The goal of this research was to develop machine learning algorithms that might predict e-commerce platform sales. A case study has been designed in this paper based on a proposed continuous Stochastic Fractal Search (SFS) based on a Guided Whale Optimization Algorithm (WOA) to optimize the parameter weights of the Bidirectional Recurrent Neural Networks (BRNN). Furthermore, a time series dataset is tested in the experiments of e-commerce demand forecasting. Finally, the results were compared to many versions of the state-of-the-art optimization techniques such as the Particle Swarm Optimization (PSO), Whale Optimization Algorithm (WOA), and Genetic Algorithm (GA). A statistical analysis has proven that the proposed algorithm can work significantly better by statistical analysis test at the P-value less than 0.05 with a one-way analysis of variance (ANOVA) test applied to confirm the performance of the proposed ensemble model. The proposed Algorithm achieved a root mean square error of RMSE (0.0000359), Mean (0.00003593) and Standard Deviation (0.000002162).

Ecommerce has a lot of potential as a new business paradigm for the twenty-first century. E-commerce development has achieved a unique high point in terms of economic growth [

The statistical regression model and the machine learning model are two types of e-commerce transaction volume forecast methods that have been developed. As opposed to statistical regression models, machine learning models have a high level of data adaptability and nonlinear fitting ability, making them attractive [

The purpose and main contribution of the analysis can be discussed as follow:

The goal of this research was to develop machine learning algorithms that might predict e-commerce platform sales.

A case study has been developed using a proposed continuous Stochastic Fractal Search (SFS) based on a Guided Whale Optimization Algorithm (WOA) to optimize the parameter weights of the Bidirectional Recurrent Neural Networks (BRNN).

An SFS is a mainly adaptive dynamic for whale optimization algorithm WOA parameters

Dataset of time series is tested in the experiments.

Compared to many versions of the-state-of-the-art optimization techniques

To conclude the performance of the proposed ensemble model based on the continuous SFS-Guided WOA algorithm and the compared models, a one-way analysis of variance (ANOVA) test is applied.

As the analysis discussed above, this paper was based on a study of solutions and models for forecast the sales of e-commerce.

Sales forecasting is a critical activity that must be completed by e-commerce, and the forecasting will have a significant influence on the corporate decision-making process. They can better understand their financial situation to manage the workforce by having sales predictions for the e-commerce platform. Still, they can also better understand their financial status by having sales predictions for the e-commerce platform and further improving their economic status supply chain management system. Based on [

The most frequent approach for predicting sales is to use time series analysis. The Autoregressive function is used in time series analysis to aid in any sort of prediction study. According to [

Another study was done by [

Reference [

The significant risk–client defaults during credit sales operations in E-commerce–is examined, and risk transfer mechanisms and preliminary risk management research. Companies can minimize the risk of credit sales operations by improving the management and control of credit sales before, during, and after the sale, combined with the credit insurance tool and other risk transfer tools in E-commerce.

Generally, ML can be classified into four categories; supervised, unsupervised, semi-supervised, and reinforcement learning. The machine-learned the previous data and knowledge feedback to predict the events with its corresponding class labels in supervised learning. The input data in supervised learning are called instances, and the value of these data are called features. The significant tasks of supervised learning algorithms are the classification and regression tasks. Unsupervised learning discovers the hidden patterns in the unlabeled data and permits modelling probability densities over the features. The primary mission for unsupervised learning is clustering and dimensionality reduction. Semi-supervised learning For both labelled data and unlabeled data, it must be used [

Semi-supervised learning algorithms. We can say that semi-supervised learning collects a minor quantity ratio of labelled data and an excellent quantity ratio of unlabeled data. Generative models, whichever an allowance of supervised learning or unsupervised learning, define whether the unlabeled data is lessening or growing the performance. Finally, Reinforcement learning is goal-oriented learning and interacting with the surrounding environment.

In traditional NNs, there are three layers: input, hidden, and output. Each layer is made up of neurons that are linked to the layers above and below it. The inputs are multiplied by a set of weights updated regularly for each enrollment input data to be tailored. The summation of the inputs multiplied by the updated weights is the processing element, followed by transformation or activation. It may be a Relu function. In deep neural networks, the hidden layer of most network designs is generally multilayer hidden levels built to be carefully learned with the properties of input [

Nowadays, real-world optimization troubles are complicated with high dimensional search areas and therefore testing to address. Heuristic Optimization techniques have been applied in several places. Meta-heuristics are family members of approximate optimization techniques that offer acceptable solutions in a reasonable time. They are adopted for resolving challenging and complex troubles in science as well as engineering.

Population-based metaheuristics involve using multiple candidates (multiple solutions), Cooperate to achieve the global goal, and avoiding local optima; the main fundamental processes of population-based metaheuristics are exploration and exploitation. Exploration is the process of finding good points in the search space, whereas exploitation is finding better points near reasonable solutions found so far. Achieving a proper trade-off between exploration and exploitation is considered the essential part of the design of metaheuristic [

A case study has been developed in this paper using an optimization technique named SFS-Guided WOA to optimize the Parameter Weights of the BRNN. A dataset of time series is tested in the experiments.

This data utilized data from the Kaggle dataset “E-Commerce Data | Actual Transactions of UK Retailer”. This transnational data collection includes all transactions made by a UK-based and registered non-store internet retailer between December 1, 2010, and December 9, 2011. The firm specializes in selling one-of-a-kind presents for any occasion. Wholesalers make up a large portion of the company’s clientele.

In the preprocessing level, the input data is standardized after selecting the appropriate features to be in a suitable representation for different machine learning estimators. Machine learning estimators’ techniques can be misbehaved in some cases from which the selected feature does not look like the standard normally distributed data. To achieve this task, the StandardScaler method is employed in this paper to update the extracted features, removing the mean and scale to unit variance. In addition to feature selection and standardization, the haematological dataset is divided into 80% as training data and 20% as testing data. The training data is used to train the machine learning estimators, and the testing data is used to calculate each estimator’s error and accuracy [

Regression is the task of approximating a mapping function between the input and the continuous output variables. In this work, an open-source software library called Scikit-Learn is used. Scikit-learn is an efficient python tool for the tasks of data mining and analysis. Three different machine learning estimators named Random Forest, Linear Regression, and Neural Networks are tested against the proposed optimization model to show its superiority and efficiency [

Meta-heuristics are techniques that can provide acceptable solutions in a suitable time interval with much less effort in computations. This section shows the proposed continuous (SFS-Guided WOA). The optimization techniques are usually adjusted to solve challenging and even complex science and engineering problems. They can be applied in various fields such as feature selection [

WOA has shown its advantages in the optimization area, and it is considered one of the most effective algorithms in the literature. However, it suffers from a low exploration capability of the search space in some applications, main parts that are different from the original WOA algorithm. These changes are used to explore the search space while being affected by the leader’s position to enhance exploration performance. Parameters will be as follow Agents 10, Iterations 80, Repetitions 20, a in range [0, 2] and r [0, 1].

The whales’ behaviour inspires the Whale Optimization Algorithm (WOA). In this Algorithm, the prey is trapped by making bubbles and forcing prey to the water surface in a spiral shape, as shown in

where

The second step is described by the named shrinking encircling that decreases

where

The next step in the continuous SFS-Guided WOA algorithm is the Guided WOA, enhancing the exploration performance. Whales in the Guided WOA algorithm follow three random whales, which allow more exploration, and the whales are not affected by the position of the leader. This is described as following.

where

where

In this step, a series of random walks near to best solution is created using a technique called the SFS diffusion method, as shown in

where

The experiments are designed to evaluate the proposed technique’s performance. First, the performance of the primary methods of BRNN, MLP, and SVR are evaluated. Then, the proposed optimizing ensemble weights model is tested. Finally, the Time Series Dataset for e-commerce demand forecasting is randomly divided into 80% for training and 20% for testing.

The performance metrics that will be used in the experiments are the root mean square error (RMSE), mean absolute error (MAE) and mean bias error (MBE). The RMSE metric can be calculated as follow to assess the prediction performance:

where

The MBE can show whether the tested model is under-predicting or over-predicting. It measures the mean bias of prediction based on the average differences in directions between the predicted and the measured values.

The First experiment tests BRNN, MLP, and SVR performance techniques without involving the ensemble technique. The results of the base models using RMSE in

The following experiment shows the results of the proposed ensemble model in

To conclude whether there is any statistical difference between the RMSE of the proposed ensemble model based on the continuous SFS-Guided WOA algorithm and the compared models, a one-way analysis of variance (ANOVA) test was applied. The hypothesis testing can be formulated here in terms of two hypotheses; the null hypothesis (

RMSE | MAE | MBE | |
---|---|---|---|

BRNN | 0.016952358 | 0.005118018 | 0.000856911 |

MLP | 0.031251305 | 0.009756531 | 0.002173715 |

SVR | 0.044473949 | 0.01531779 | 0.006111473 |

Optimizing ensemble | 3.49982E-05 | 0.000222191 | 0.000101235 |

SS | DF | MS | F (DFn, DFd) | P value | |
---|---|---|---|---|---|

Treatment (between columns) | 0.02242 | 3 | 0.007473 | F (3, 76) = 68.76 | P < 0.0001 |

Residual (within columns) | 0.00826 | 76 | 0.000109 | – | – |

Total | 0.03068 | 79 | – | – | – |

BRNN | MLP | SV R | Optimizing ensemble | |
---|---|---|---|---|

Theoretical median | 0 | 0 | 0 | |

Actual median | 0.01785 | 0.03345 | 0.04567 | |

Number of values | 20 | 20 | 20 | |

Wilcoxon signed rank test | ||||

Sum of signed ranks (W) | 210 | 210 | 210 | |

Sum of positive ranks | 210 | 210 | 210 | |

Sum of negative ranks | 0 | 0 | 0 | |

P value (two tailed) | <0.0001 | <0.0001 | <0.0001 | |

Exact or estimate? | Exact | Exact | Exact | |

P-value summary | ∗∗∗∗ | ∗∗∗∗ | ∗∗∗∗ | ∗∗∗∗ |

Significant (alpha = 0.05)? | Yes | Yes | Yes | |

How big is the discrepancy? | ||||

Discrepancy | 0.01785 | 0.03345 | 0.04567 |

The residuals

The p-values of the proposed model are tested compared to BRNN, MLP, and SVR models based on Wilcoxon’s rank-sum test as shown in

BRNN | MLP | SV R | Optimizing ensemble | |
---|---|---|---|---|

Number of values | 20 | 20 | 20 | 20 |

Minimum | 0.01089 | 0.006345 | 0.005674 | |

25% Percentile | 0.01785 | 0.03345 | 0.04567 | |

Median | 0.01785 | 0.03345 | 0.04567 | |

75% Percentile | 0.01785 | 0.03345 | 0.04567 | |

Maximum | 0.05785 | 0.08345 | 0.07567 | |

Range | 0.04697 | 0.07711 | 0.07 | |

10% Percentile | 0.01785 | 0.02355 | 0.04567 | |

90% Percentile | 0.04485 | 0.03345 | 0.04567 | |

Actual confidence level | 95.86% | 95.86% | 95.86% | |

Lower confidence limit | 0.01785 | 0.03345 | 0.04567 | |

Upper confidence limit | 0.01785 | 0.03345 | 0.04567 | |

Mean | 0.021 | 0.03365 | 0.04517 | |

Std. deviation | 0.01112 | 0.01341 | 0.01146 | |

Std. error of mean | 0.002487 | 0.002998 | 0.002562 | |

Lower 95% CI of mean | 0.0158 | 0.02737 | 0.03981 | |

Upper 95% CI of mean | 0.02621 | 0.03992 | 0.05054 | |

Coefficient of variation | 52.95% | 39.85% | 25.37% | |

Geometric mean | 0.0194 | 0.03116 | 0.0422 | |

Geometric SD factor | 1.433 | 1.557 | 1.625 | |

Lower 95% CI of geo. mean | 0.0164 | 0.02533 | 0.03362 | |

Upper 95% CI of geo. mean | 0.02296 | 0.03834 | 0.05297 | |

Harmonic mean | 0.01848 | 0.02734 | 0.03427 | |

Lower 95% CI of harm. mean | 0.01643 | 0.01994 | 0.02202 | |

Upper 95% CI of harm. mean | 0.02111 | 0.04351 | 0.07721 | |

Quadratic mean | 0.02364 | 0.03609 | 0.04653 | |

Lower 95% CI of quad. mean | 0.0137 | 0.02579 | 0.04145 | |

Upper 95% CI of quad. mean | 0.03049 | 0.04405 | 0.05111 | |

Skewness | 2.883 | 2.46 | −1.292 | |

Kurtosis | 7.679 | 11.5 | 10.28 | |

Sum | 0.4201 | 0.6729 | 0.9035 |

ROC analysis is a helpful method for assessing diagnostic test performance and, more broadly, assessing the correctness of a statistical model (

Optimizing ensemble | PSO | WOA | GA | |
---|---|---|---|---|

Number of values | 20 | 20 | 20 | 20 |

Minimum | 2.959e-005 | 0.0003562 | 0.0001062 | 0.0003562 |

25% Percentile | 3.590e-005 | 0.0004562 | 0.0001562 | 0.0004562 |

Median | 3.590e-005 | 0.0004562 | 0.0001562 | 0.0004562 |

75% Percentile | 3.590e-005 | 0.0004562 | 0.0001562 | 0.0004562 |

Maximum | 4.290e-005 | 0.0005562 | 0.0003562 | 0.0006562 |

Range | 1.331e-005 | 0.0002000 | 0.0002500 | 0.0003000 |

Mean | 3.593e-005 | 0.0004562 | 0.0001637 | 0.0004712 |

Std. deviation | 2.162e-006 | 3.244e-005 | 4.667e-005 | 5.871e-005 |

Std. error of mean | 4.833e-007 | 7.255e-006 | 1.043e-005 | 1.313e-005 |

Sum | 0.0007187 | 0.009124 | 0.003274 | 0.009424 |

To confirm the suggested Algorithm’s correctness, it is compared to the PSO, WOA, and GA algorithms. The resilience and reliability of the forecasting tasks for selecting the best subset of dataset characteristics are confirmed by the findings in

When working on this study of utilizing machine learning to anticipate e-commerce sales, it was discovered that there are many various techniques of projecting e-commerce platform sales. Still, the researcher was only able to focus on widely used algorithms when forecasting future sales. A case study has been developed in this paper using a proposed continuous SFS-Guided WOA algorithm to optimize the parameter weights of the BRNN. A dataset for the risk assessment problem in the supply chain networks is tested in the experiments. The results and the ANOVA test concluded the performance of the proposed ensemble model, especially after comparison with many different optimization algorithms such as PSO, WOA and GA. There is still a need for further research and in-depth study in the future work of this study to create and define the correlation between the risk of credit sales activities in e-commerce and sales forecasting. The proposed Algorithm will be evaluated on continuous issues, restricted engineering challenges, and binary problems. The authors will try to improve this continuous Algorithm to enhance and validate the suggested Algorithm’s performance at CEC2017 or CEC2019.