# Dynamic Pricing Method in the E-Commerce Industry Using Machine Learning
## 3 Materials and Methods
For each record, an expert needed to determine whether the product price should be lowered, kept the same, or raised. This was essential work because it provided the training material for the machine learning models. The model will ultimately support managers in making decisions, but it must first learn from managers' own behavior. Step 2. Selection of machine learning models for analysis in the dynamic pricing method for the e-commerce industry. In this step of the method, machine learning models for further analysis needed to be selected. The proposed method suggested choosing popular models, namely, the Naive Bayes classifier, linear and nonlinear support vector machines, decision trees, and the \begin{table}
\begin{tabular}{c l l} \hline \hline
**Criterion** & \multicolumn{1}{c}{**Name**} & **Remarks** \\ \hline \multicolumn{3}{c}{Customer criteria} \\ \(C_{1}\) & Number of transactions & in the last 100 days by a given customer \\ \(C_{2}\) & Average transaction value & in the last 100 days by a given customer \\ \(C_{3}\) & Number of complaints & in the last 100 days by a given customer \\ \(C_{4}\) & Time since last transaction & in the last 100 days by a given customer \\ \multicolumn{3}{c}{Enterprise criteria} \\ \(C_{5}\) & Inventory level & of the given product \\ \(C_{6}\) & Profit margin & of the given product \\ \(C_{7}\) & Storage cost & of the given product \\ \multicolumn{3}{c}{Market criteria} \\ \(C_{8}\) & Price relative to competitors & of the given product \\ \(C_{9}\) & Seasonality & of the given product \\ \(C_{10}\) & Demand dynamics & of the given product \\ \hline \hline \end{tabular} Source: own elaboration.  
\end{table} 
Table 2: Set of criteria for the dynamic pricing method for the e-commerce industry. k-nearest neighbor algorithm. These algorithms were used because, in addition to their popularity, each has unique properties that allow for diverse approaches to data analysis. The Naive Bayes classifier is simple and efficient with large datasets, making it a good baseline for comparison. Support vector machines (linear and nonlinear) are robust and effective with datasets containing a large number of features, with linear SVMs being suitable for linearly separable data and nonlinear SVMs capable of capturing complex relationships through kernel functions. Decision trees offer transparency and ease of result interpretation, making them valuable for managerial insights and modeling non-linear relationships in dynamic pricing scenarios. The k-nearest neighbor algorithm allows for the flexible modeling of relationships in the data, though it can be computationally intensive with larger datasets. The selection of these models was also driven by the need to balance interpretability, computational efficiency, and predictive accuracy, as well as their alignment with the nature of the dataset and the problem. Naive Bayes provides a straightforward and computationally efficient approach, while decision trees offer clear decision paths that can be readily understood by managers. SVMs provide robustness and versatility for both simple and complex datasets and k-NN serves as a benchmark for evaluating the performance of more advanced models. The selected dataset, consisting of 500 transactions from an e-commerce store, featured a combination of numerical, categorical, and ordinal variables, making these models particularly suitable. For example, the simplicity of Naive Bayes facilitated the rapid processing of the dataset, while SVMs could effectively handle the multidimensional nature of the features, ensuring robust classification. Decision trees were especially valuable for interpreting how specific criteria--such as storage costs or price relative to competitors--influenced pricing decisions, making them ideal for managerial applications. Meanwhile, k-NN allowed for the flexible modeling of patterns within the data, serving as a baseline for identifying the strengths and weaknesses of more complex algorithms.