# Dynamic Pricing Method in the E-Commerce Industry Using Machine Learning
## 4 Results
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & \(\mathbf{C_{1}}\) & \(\mathbf{C_{2}}\) & \(\mathbf{C_{3}}\) & \(\mathbf{C_{4}}\) & \(\mathbf{C_{5}}\) \\ \hline \(o_{1}\) & 0.333 & 0.316 & 0.000 & 0.230 & 0.780 \\ \(o_{2}\) & 0.889 & 0.077 & 0.000 & 0.180 & 0.920 \\ \(o_{3}\) & 0.111 & 0.453 & 0.000 & 0.670 & 0.590 \\ \(o_{4}\) & 0.444 & 0.025 & 0.500 & 0.200 & 0.830 \\ \(o_{5}\) & 0.222 & 0.231 & 0.000 & 0.070 & 0.910 \\ \hline  & \(C_{6}\) & \(C_{7}\) & \(C_{8}\) & \(C_{9}\) & \(C_{10}\) \\ \hline \(o_{1}\) & 0.214 & 0.750 & 1.000 & 0.000 & 0.750 \\ \(o_{2}\) & 0.293 & 0.500 & 0.250 & 0.000 & 0.750 \\ \(o_{3}\) & 0.428 & 0.500 & 0.250 & 1.000 & 0.500 \\ \(o_{4}\) & 0.177 & 0.000 & 0.500 & 0.000 & 0.250 \\ \(o_{5}\) & 0.321 & 0.750 & 0.500 & 0.000 & 0.750 \\ \hline \hline \end{tabular} Source: own elaboration.  
\end{table} 
Table 4: Sample of the normalized target machine learning database. \begin{table}
\begin{tabular}{c c} \hline \hline
**Machine Learning Mechanism** & **Basic Hyperparameters** \\ \hline \multirow{5}{*}{Naive Bayes Classifier} & \(-\) & alpha: Laplace smoothing parameter, helps to avoid issues with zero frequencies. \\  & \(-\) & fit\_prior: specifies whether to learn class prior probabilities or not. \\  & \(-\) & class\_prior: specifies prior probabilities of classes (if not set, they are calculated from the data). \\ \hline \multirow{5}{*}{Linear and Nonlinear Support Vector Machines} & \(-\) & C: regularization parameter that controls the classification cost and influences the margin width. \\  & \(-\) & kernel: choice of the kernel function for data transformation (e.g., ’linear’, ’poly’, ’rbf’). \\  & \(-\) & gamma: parameter for the kernel function (only for certain kernels like ’poly’, ’rbf’). \\  & \(-\) & degree: the degree of the polynomial for polynomial kernel functions (only for ’poly’). \\  & \(-\) & coef0: the free parameter in the kernel function (only for ’poly’ and ’sigmoid’). \\ \hline \multirow{5}{*}{Decision Trees} & \(-\) & max\_depth: maximum tree depth. \\  & \(-\) & min\_samples\_split: minimum number of samples required to split an internal node. \\ \cline{1-1}  & \(-\) & min\_samples\_leaf: minimum number of samples required in an internal node’s leaf. \\ \cline{1-1}  & \(-\) & criterion: split criterion for internal node (e.g., ’gini’ or ’entropy’). \\ \cline{1-1}  & \(-\) & max\_features: maximum number of features considered during the split. \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Basic hyperparameters of selected machine learning algorithms in dynamic pricing for the e-commerce industry. Step 3. Implementation of the learning process for the selected machine learning algorithms. The dataset was divided into two subsets, with the training set containing 375 records (75% of the data) and the test set containing 125 records (25% of the data). The 'train_test_split' function from the Python scikit-learn library, dedicated to machine learning, was used for the split. The division was random. This process was then repeated one hundred times according to the cross-validation mechanism. For each of these one hundred random splits, the training process was conducted for all analyzed algorithms. Then, the average accuracy metrics for each algorithm were calculated. The results of the training for each algorithm are presented in Table 6.  
The linear support vector machine (SVM) algorithm ranked first in terms of average accuracy from a hundred training processes, with a score of 0.8692. The high accuracy of this algorithm indicated its ability to effectively classify data and make accurate pricing decisions in the e-commerce context. Due to its simplicity and efficiency in linearly separable spaces, the linear SVM can be a preferred choice in many dynamic pricing scenarios. The nonlinear support vector machine (SVM) ranked second with a score of 0.8432, suggesting that more advanced, nonlinear SVM models can also be effective in dynamic pricing.