# Construction of the Luxury Marketing Model Based on Machine Learning Classification Algorithm

Authors: Qiaoshan Chen; Shousong Cai; Xiaomin Gu
Journal: Scientific Programming
 (2021)

---

## Abstract

China has become the world’s largest luxury goods consumer market due to its population base. In view of the bright prospects of the luxury consumer market, major companies have entered and want to get a share. For the luxury goods industry, traditional mass marketing methods are not able to serve corporate sales and marketing strategies more effectively, and targeted marketing is clearly much more efficient than randomized marketing. Therefore, in this paper, based on consumer buying habits and characteristics data of luxury goods, the paper uses a machine learning algorithm to build a personalized marketing strategy model. And the paper uses historical data to model and form deductions to predict the purchase demand of each consumer and evaluate the possibility of customers buying different goods, including cosmetics, jewelry, and clothing.


---

## Body

## 1. Introduction

In recent years, with the rapid development of the economy, people’s living standards have also risen. China has become the world’s largest luxury goods consumer market due to its population base. The consumption of Chinese luxury consumers has increased year by year, accounting for 35% of the global luxury market. Some people expect that China’s consumption will account for half of the world’s market by 2025. In view of the bright prospects of the luxury consumer market, major companies have entered and want to get a share [1]. At this time, for enterprises, how to carry out effective marketing has become the key to the survival and even prosperity of enterprises. Specifically, how to collect and process the data, understand the user’s needs, accurately find the target user group, and provide corresponding solutions so as to achieve enterprise profit and user experience win-win is in line with the trend of the times.However, for the luxury goods industry, traditional mass marketing methods are not able to serve corporate sales and marketing strategies more effectively, and targeted marketing is clearly much more efficient than randomized marketing [2]. As we all know, the actual purchase behavior and past habits of customers in the past are the guides to future shopping behavior. In other words, it is accurate to infer customers’ future consumption behavior according to their past consumption habits and behaviors. Therefore, enterprises can collect and save consumers’ actual consumption records, search records, website clicks, and personal information and then utilize machine learning algorithms to accurately simulate consumer habits and behaviors so as to accurately locate the target customer group and realize the precise marketing of customers.


## 2. Machine Learning Classification Algorithm and Selection

There are two main technologies in the field of data mining: classification algorithm and clustering algorithm. The method of classification is to construct a classification function or a classification model according to the characteristics of data sets and map the samples of unknown categories to a given category with the model so as to achieve the effect of classification [3]. The classification algorithm process mainly consists of two steps: in the first step, create a model that describes the categories of known data sets, which is obtained by analyzing the data records in the database, and the columns of each record are descriptions of their attributes, and in the second step, the obtained model is used for the purpose of classification operation.Classification algorithms are widely used, such as loan risk assessment, telecom customer classification, spam identification, potential user classification, consumer demand forecast analysis, and so on [4]. Different classification methods will produce different classifiers, the advantages and disadvantages of which directly affect the efficiency and accuracy of data mining. Therefore, when classifying data, it is important to choose the most efficient classification algorithm.


### 2.1. Artificial Neural Network Classification Algorithm

The artificial neural network (ANN) is a mathematical model that uses information similar to the structure of brain synaptic connections for information processing. The most basic component of neural networks is the neuron model [5]. Each neuron is connected to other neurons, and the neuron can receive input signals from n other neurons. From the computer point of view, we can ignore whether the neural network really simulates the biological nervous system but only need to regard a neural network as a mathematical model containing many parameters, which is composed of several functions [6].The key point of the neural network classification algorithm is to construct a threshold logic unit. A logical unit is an object that can input a set of weighting coefficients and sum them. If the sum reaches or exceeds a certain threshold, an amount is output. Assume the following input valuesx1, x2, …, xn, and their weight coefficients are w1, w2, …, wn, summation calculation is xi×w1, and the excitation layer is as follows:(1)a=x1×w1+x2×w2+⋯+xi×wi+⋯+xn×wn.Here,xi is the frequency of occurrence of each record or other parameters and wi is the weight coefficient obtained in the real-time feature evaluation model.There are many types of neural network models, including RBF networks, ART networks, SOM networks, cascading related networks, and so on. In practical applications, it has been found that the advantages of artificial neural networks include high accuracy, strong parallel processing capability, strong distributed storage and learning ability, and the function of associative memory. However, it still has some shortcomings that neural networks require a lot of parameters as a hard-to-interpret “black box model,” and it cannot observe the learning process [7].


### 2.2. Decision Tree Classification Algorithm

The decision tree is the most common classification algorithm. Decision tree is based on the structure of the tree for decision-making. Generally, a decision tree contains a node, several internal nodes, and several leaf nodes. The leaf nodes correspond to decision results, and each other node corresponds to a property test [8]. The sample set contained in each node is divided into child nodes according to the result of the attribute test. The node contains the complete set of samples, and the path from the node to each leaf node corresponds to a decision test sequence. The purpose of decision tree learning is to create a tree with strong generalization ability [9].Currently, the most famous representative of the decision tree learning algorithm is ID3, CART, C4.5 (C5.0), Random Forest, and multivariate adaptive regression spline (MARS) algorithm. They have their own differences in the choice of techniques used to test attributes, the structure of the resulting decision tree, the method of pruning, timing, ability to handle large data sets, and so on. For example, C4.5 Rule is an algorithm that converts a C4.5 decision tree into a symbol rule. Each branch of the decision tree can be overridden by a rule, but the C4.5 Rule algorithm will perform rules preassembly and deletion operation during the conversion process, so the generalization performance of the final rule set may even be better than the original decision tree.The advantages of a decision tree algorithm include easy understanding, simple data preparation, the ability to process both data and regular attributes, easy derivation of logical expressions, strong data source analysis capability, and so on [10, 11]. And its disadvantage is mainly that for data with inconsistent sample sizes for each category, in the decision tree, the results of the information gain are biased toward those with more values. In addition, a decision tree is difficult to deal with missing data, and sometimes, it would probably lead to overfitting problems.


### 2.3. K-Nearest Neighbor Classification Algorithm

K-nearest neighbor (KNN) classification algorithm was first proposed by Cover and Hart in 1968, and it has developed into a more mature method in theory. Its core idea is to judge the characteristics of data according to the nearest samples [12–15]. The specific idea of the KNN algorithm is: find out k training samples closest to the unknown sample x, determine which category most of the k samples belong to, and then categorize x into that category. KNN is similar in principle to the limit theorem, but it is only related to a very small number of adjacent samples in class decision-making. In addition, the KNN method is more suitable than other methods for the sample set with more overlaps because it mainly depends on the limited neighboring samples around, rather than the method of discriminating the class domain to determine the category.The main applications of the KNN algorithm in the industry are as follows: customer churn prediction and loan fraud, Euclidean distance calculation, and so on. KNN algorithm is more suitable for the automatic classification of class domains with larger sample size, but it is easier to produce misclassification for those domains with smaller sample size.KNN algorithm also has obvious shortcomings. Since the KNN algorithm is a lazy learning method, its accuracy will be affected naturally. KNN algorithm’s category score is not standardized as a probability score, and the interpretability of output is not strong. In addition, one of the biggest problems of KNN is a large amount of calculation. At present, the commonly used solution is to remove samples that have little effect on classification beforehand.


### 2.4. Logistic Regression Classification Algorithms

Logistic regression is also a very common classification algorithm, especially in the field of enterprise management. The applications of logistic regression include analysis of the possibility of consumers buying goods, potential consumer forecasting, potential consumer forecast, precision decision-making of advertising placement, and so on.Dependent variables of logistic regression can be bi- or multicategorized. But the former is more common and easier to explain, so the most commonly used in practice is bicategorized logistic regression.The conventional steps of the logistic regression classification algorithm are as follows:(1)
Construct predictive functionh. The general predictive function is in the following form:(2)hθx=gθTx=11+e−θTx.(2)
Construct loss functionJ. The general loss function is in the following form:(3)Jθ=−1mlθ.(3)
Try to minimizeJ function and get regression parameters (θ).Generally, the advantage of logistic regression is that logistic regression models are usually more intuitive and easier to interpret. Since the algorithm can give a specific prediction probability for each target category, it is easy to compare between variables. The disadvantage of logistic regression is that the effect of processing high-dimensional data is not ideal.


### 2.5. Support Vector Machine Classification Algorithms

Support vector machine (SVM) algorithm is proposed by Vapnik in 1995. The SVM algorithm has relatively good performance indicators. The basic idea of SVM is based on training setD to find a dividing hyperplane in the sample space and separate the samples of different categories. The hyperplane can separate the data in the training set, and the distance from the class boundary is perpendicular to the direction of the hyperplane. Therefore, SVM algorithm is also called the maximum margin algorithm. The specific algorithm steps are as follows:Given a kernel functionK, training sample data set Xtraim=xi,yii=1n, construct a cost function Φ to minimize it as follows:(4)Φw,ξ=12wtw+C∑i=1nξik.The constraints are(5)yiwTw+b≥1−ξi,ξi≥0;i=1,2,…,n,where C is penalty factor, ξi is actual error, k = 1 or 2, w is classified interface vector, and b is intercept. According to the constraints, the Lagrangian function is as follows:(6)Lp=w22+C∑i=1nξik−∑i=1nαiyiwTxi+b−1+ξi−∑i=1nμiξi.where αi≥0, μi≥0, αi, and μi are Lagrange multipliers. Finally, according to KKT conditions, we can obtain:(7)αiyiwTxi+b−1+ξi=0i=1,2,…,n,C−αiξi=0i=1,2,…,n,C≥αi≥0,∑i=1nαiyi=0.Determine the category of a new samplex as follows:(8)sgnfx=sgn∑i=1nαiyiKx1,xi+b.In summary, the solution of the support vector machine is a convex optimization technique by means of the Lagrangian function. The advantages of the SVM classification algorithm include effective solution to machine learning problems, high-dimensional problems, nonlinear problems in small sample cases, and avoiding neural network structure selection and local minimum point problem. But its limitations are sensitive to missing data, and there is no universal solution to nonlinear problems.


### 2.6. Selection of Classification Algorithms for Luxury Marketing

The purpose of this paper is to use the classification algorithm model to analyze the most likely target populations of several high-end luxury goods in a certain region. We chose fragrance, makeup, and skincare for empirical analysis. We divided the sample set into two parts: the training set and the test set. The ratio of the number of samples in the training set to the test set is exquisite. Because if the training set is too small, the classifier obtained by the training must not be excellent enough; but if the training set is too large, the error rate estimate will be very low. The most common methods include resubstitution, retention, and cross-validation. Among them, the retention method is to use a part of the sample set as the training set and retain the remaining part as the test set. And the best ratio of the training set to test set is 7:3.We used full sample data to construct model and then chose the optimal model through empirical analysis results. The empirical results of all the classification algorithms are shown in Table1.Table 1
Empirical results of all classification algorithms.
AlgorithmAccuracyErrorPrecision (positive)Recall (positive)Precision (negative)Recall (negative)F1 measureANN0.9260.0710.1480.5620.9900.9340.475Decision tree0.9300.0720.1560.5980.9920.9340.501KNN0.9680.0330.3220.3490.9680.9100.665Logistic regression0.9270.0710.6890.0030.9271.0010.008SVM0.9220.7790.1980.4430.9790.9410.550We can see that the accuracy of the five algorithms is over 0.9. Negative samples have high accuracy and recall rates, but positive sample accuracy and recall rates are generally low. The overall performance of decision trees, artificial neural networks, and support vector machines is relatively better. In practical applications, enterprises pay more attention to the accuracy of forecast results, that is, they pay more attention to which customers will buy products, and what kind of products will be purchased and do not pay attention to customers who will not buy; we should focus on analyzing the purchase crowd. We believe that the reason for this phenomenon is that the sample data is not too balanced, which greatly affects the accuracy of machine learning.Through further analysis, we obtained the ROC curve of all the algorithms, as shown in Figure1.Figure 1
ROC curve of all the algorithms: (a) ANN algorithm, (b) decision tree algorithm, (c) KNN algorithm, (d) logistic regression algorithm, and (e) SVM algorithm.
(a)(b)(c)(d)(e)From the ROC curve of each algorithm, we can see the simulation results are not very good. Relatively, decision tree algorithm, artificial neural network, and support vector machine algorithm are better. The corresponding area under the curve of ROC (AUC) of the five model algorithms is summarized in Table2.Table 2
Evaluation parameters of all classification algorithms.
AlgorithmCalculation speed (s)Classifier’s fitness for dataInterpretabilityAUC valueANN266.71Data do not need to be standardizedComplex0.597Decision tree206.81Data need to be standardizedStrong0.611KNN210.34Data need to be standardizedNot strong0.598Logistic regression187.79Data need to be standardizedStrong0.525SVM375.69Data need to be standardizedComplex0.605We can conclude that the decision tree algorithm performs better, but it is not particularly noticeable. Logistic regression algorithm, decision tree algorithm, and KNN algorithm learn faster in the modeling process than ANN algorithm and SVM algorithm. But by comprehensively considering the classifier’s fitness for data, the interpretability of the model, and the AUC value, since the decision tree algorithm has the advantages of simple data processing, strong interpretability, and intuitive visualization of the tree structure between variables, we choose decision tree algorithm for empirical research.


## 2.1. Artificial Neural Network Classification Algorithm

The artificial neural network (ANN) is a mathematical model that uses information similar to the structure of brain synaptic connections for information processing. The most basic component of neural networks is the neuron model [5]. Each neuron is connected to other neurons, and the neuron can receive input signals from n other neurons. From the computer point of view, we can ignore whether the neural network really simulates the biological nervous system but only need to regard a neural network as a mathematical model containing many parameters, which is composed of several functions [6].The key point of the neural network classification algorithm is to construct a threshold logic unit. A logical unit is an object that can input a set of weighting coefficients and sum them. If the sum reaches or exceeds a certain threshold, an amount is output. Assume the following input valuesx1, x2, …, xn, and their weight coefficients are w1, w2, …, wn, summation calculation is xi×w1, and the excitation layer is as follows:(1)a=x1×w1+x2×w2+⋯+xi×wi+⋯+xn×wn.Here,xi is the frequency of occurrence of each record or other parameters and wi is the weight coefficient obtained in the real-time feature evaluation model.There are many types of neural network models, including RBF networks, ART networks, SOM networks, cascading related networks, and so on. In practical applications, it has been found that the advantages of artificial neural networks include high accuracy, strong parallel processing capability, strong distributed storage and learning ability, and the function of associative memory. However, it still has some shortcomings that neural networks require a lot of parameters as a hard-to-interpret “black box model,” and it cannot observe the learning process [7].


## 2.2. Decision Tree Classification Algorithm

The decision tree is the most common classification algorithm. Decision tree is based on the structure of the tree for decision-making. Generally, a decision tree contains a node, several internal nodes, and several leaf nodes. The leaf nodes correspond to decision results, and each other node corresponds to a property test [8]. The sample set contained in each node is divided into child nodes according to the result of the attribute test. The node contains the complete set of samples, and the path from the node to each leaf node corresponds to a decision test sequence. The purpose of decision tree learning is to create a tree with strong generalization ability [9].Currently, the most famous representative of the decision tree learning algorithm is ID3, CART, C4.5 (C5.0), Random Forest, and multivariate adaptive regression spline (MARS) algorithm. They have their own differences in the choice of techniques used to test attributes, the structure of the resulting decision tree, the method of pruning, timing, ability to handle large data sets, and so on. For example, C4.5 Rule is an algorithm that converts a C4.5 decision tree into a symbol rule. Each branch of the decision tree can be overridden by a rule, but the C4.5 Rule algorithm will perform rules preassembly and deletion operation during the conversion process, so the generalization performance of the final rule set may even be better than the original decision tree.The advantages of a decision tree algorithm include easy understanding, simple data preparation, the ability to process both data and regular attributes, easy derivation of logical expressions, strong data source analysis capability, and so on [10, 11]. And its disadvantage is mainly that for data with inconsistent sample sizes for each category, in the decision tree, the results of the information gain are biased toward those with more values. In addition, a decision tree is difficult to deal with missing data, and sometimes, it would probably lead to overfitting problems.


## 2.3. K-Nearest Neighbor Classification Algorithm

K-nearest neighbor (KNN) classification algorithm was first proposed by Cover and Hart in 1968, and it has developed into a more mature method in theory. Its core idea is to judge the characteristics of data according to the nearest samples [12–15]. The specific idea of the KNN algorithm is: find out k training samples closest to the unknown sample x, determine which category most of the k samples belong to, and then categorize x into that category. KNN is similar in principle to the limit theorem, but it is only related to a very small number of adjacent samples in class decision-making. In addition, the KNN method is more suitable than other methods for the sample set with more overlaps because it mainly depends on the limited neighboring samples around, rather than the method of discriminating the class domain to determine the category.The main applications of the KNN algorithm in the industry are as follows: customer churn prediction and loan fraud, Euclidean distance calculation, and so on. KNN algorithm is more suitable for the automatic classification of class domains with larger sample size, but it is easier to produce misclassification for those domains with smaller sample size.KNN algorithm also has obvious shortcomings. Since the KNN algorithm is a lazy learning method, its accuracy will be affected naturally. KNN algorithm’s category score is not standardized as a probability score, and the interpretability of output is not strong. In addition, one of the biggest problems of KNN is a large amount of calculation. At present, the commonly used solution is to remove samples that have little effect on classification beforehand.


## 2.4. Logistic Regression Classification Algorithms

Logistic regression is also a very common classification algorithm, especially in the field of enterprise management. The applications of logistic regression include analysis of the possibility of consumers buying goods, potential consumer forecasting, potential consumer forecast, precision decision-making of advertising placement, and so on.Dependent variables of logistic regression can be bi- or multicategorized. But the former is more common and easier to explain, so the most commonly used in practice is bicategorized logistic regression.The conventional steps of the logistic regression classification algorithm are as follows:(1)
Construct predictive functionh. The general predictive function is in the following form:(2)hθx=gθTx=11+e−θTx.(2)
Construct loss functionJ. The general loss function is in the following form:(3)Jθ=−1mlθ.(3)
Try to minimizeJ function and get regression parameters (θ).Generally, the advantage of logistic regression is that logistic regression models are usually more intuitive and easier to interpret. Since the algorithm can give a specific prediction probability for each target category, it is easy to compare between variables. The disadvantage of logistic regression is that the effect of processing high-dimensional data is not ideal.


## 2.5. Support Vector Machine Classification Algorithms

Support vector machine (SVM) algorithm is proposed by Vapnik in 1995. The SVM algorithm has relatively good performance indicators. The basic idea of SVM is based on training setD to find a dividing hyperplane in the sample space and separate the samples of different categories. The hyperplane can separate the data in the training set, and the distance from the class boundary is perpendicular to the direction of the hyperplane. Therefore, SVM algorithm is also called the maximum margin algorithm. The specific algorithm steps are as follows:Given a kernel functionK, training sample data set Xtraim=xi,yii=1n, construct a cost function Φ to minimize it as follows:(4)Φw,ξ=12wtw+C∑i=1nξik.The constraints are(5)yiwTw+b≥1−ξi,ξi≥0;i=1,2,…,n,where C is penalty factor, ξi is actual error, k = 1 or 2, w is classified interface vector, and b is intercept. According to the constraints, the Lagrangian function is as follows:(6)Lp=w22+C∑i=1nξik−∑i=1nαiyiwTxi+b−1+ξi−∑i=1nμiξi.where αi≥0, μi≥0, αi, and μi are Lagrange multipliers. Finally, according to KKT conditions, we can obtain:(7)αiyiwTxi+b−1+ξi=0i=1,2,…,n,C−αiξi=0i=1,2,…,n,C≥αi≥0,∑i=1nαiyi=0.Determine the category of a new samplex as follows:(8)sgnfx=sgn∑i=1nαiyiKx1,xi+b.In summary, the solution of the support vector machine is a convex optimization technique by means of the Lagrangian function. The advantages of the SVM classification algorithm include effective solution to machine learning problems, high-dimensional problems, nonlinear problems in small sample cases, and avoiding neural network structure selection and local minimum point problem. But its limitations are sensitive to missing data, and there is no universal solution to nonlinear problems.


## 2.6. Selection of Classification Algorithms for Luxury Marketing

The purpose of this paper is to use the classification algorithm model to analyze the most likely target populations of several high-end luxury goods in a certain region. We chose fragrance, makeup, and skincare for empirical analysis. We divided the sample set into two parts: the training set and the test set. The ratio of the number of samples in the training set to the test set is exquisite. Because if the training set is too small, the classifier obtained by the training must not be excellent enough; but if the training set is too large, the error rate estimate will be very low. The most common methods include resubstitution, retention, and cross-validation. Among them, the retention method is to use a part of the sample set as the training set and retain the remaining part as the test set. And the best ratio of the training set to test set is 7:3.We used full sample data to construct model and then chose the optimal model through empirical analysis results. The empirical results of all the classification algorithms are shown in Table1.Table 1
Empirical results of all classification algorithms.
AlgorithmAccuracyErrorPrecision (positive)Recall (positive)Precision (negative)Recall (negative)F1 measureANN0.9260.0710.1480.5620.9900.9340.475Decision tree0.9300.0720.1560.5980.9920.9340.501KNN0.9680.0330.3220.3490.9680.9100.665Logistic regression0.9270.0710.6890.0030.9271.0010.008SVM0.9220.7790.1980.4430.9790.9410.550We can see that the accuracy of the five algorithms is over 0.9. Negative samples have high accuracy and recall rates, but positive sample accuracy and recall rates are generally low. The overall performance of decision trees, artificial neural networks, and support vector machines is relatively better. In practical applications, enterprises pay more attention to the accuracy of forecast results, that is, they pay more attention to which customers will buy products, and what kind of products will be purchased and do not pay attention to customers who will not buy; we should focus on analyzing the purchase crowd. We believe that the reason for this phenomenon is that the sample data is not too balanced, which greatly affects the accuracy of machine learning.Through further analysis, we obtained the ROC curve of all the algorithms, as shown in Figure1.Figure 1
ROC curve of all the algorithms: (a) ANN algorithm, (b) decision tree algorithm, (c) KNN algorithm, (d) logistic regression algorithm, and (e) SVM algorithm.
(a)(b)(c)(d)(e)From the ROC curve of each algorithm, we can see the simulation results are not very good. Relatively, decision tree algorithm, artificial neural network, and support vector machine algorithm are better. The corresponding area under the curve of ROC (AUC) of the five model algorithms is summarized in Table2.Table 2
Evaluation parameters of all classification algorithms.
AlgorithmCalculation speed (s)Classifier’s fitness for dataInterpretabilityAUC valueANN266.71Data do not need to be standardizedComplex0.597Decision tree206.81Data need to be standardizedStrong0.611KNN210.34Data need to be standardizedNot strong0.598Logistic regression187.79Data need to be standardizedStrong0.525SVM375.69Data need to be standardizedComplex0.605We can conclude that the decision tree algorithm performs better, but it is not particularly noticeable. Logistic regression algorithm, decision tree algorithm, and KNN algorithm learn faster in the modeling process than ANN algorithm and SVM algorithm. But by comprehensively considering the classifier’s fitness for data, the interpretability of the model, and the AUC value, since the decision tree algorithm has the advantages of simple data processing, strong interpretability, and intuitive visualization of the tree structure between variables, we choose decision tree algorithm for empirical research.


## 3. Construction of the Luxury Marketing Model

Here, we take the data of the luxury market in a certain area as an example and construct the marketing model to analyze potential buyers’ purchase needs.


### 3.1. Case Background

In the field of cosmetics, especially in the high-end cosmetics field, which has been hot in recent years, the purchase demand of consumers is the most concerned issue of enterprises. Therefore, based on the theoretical research basis of the classification algorithm as above, this paper collects the sales data of luxury goods in a certain area and conducts the corresponding customer demand forecast analysis. We have chosen cosmetics, jewelry, and clothing, which are typical luxury consumer goods, to carry out empirical research on the marketing model. In the actual modeling process, the possibility that each consumer will purchase these three types of products will be predicted: 1 represents possible purchase, and 0 represents impossible purchase.The specific research ideas are as follows: firstly, collect purchase data of related commodities from July 1, 2017, to March 31, 2018, and then the original data are processed to sort out the variables needed for modeling into three tables: cosmetics, jewelry, and clothing. Taking table jewelry as an example, we define that if there is a jewelry-purchasing record in the first nine months, as well as in the last three months, then the explanatory variable is marked as 1. If there is no purchase record in the last three months, then the explanatory variable is marked as 0. In the three tables, all variables except the explained variable are the same.


### 3.2. Data Preparation

According to the case background, we selected 16 variables from the database. Figure2 displays model variables arrangement.Figure 2
Model variables arrangement.According to the above 16 variables, the consumption and quantity ratio of cosmetics, jewelry, and clothing is to be calculated. Together with other variables, which are quantified, we sorted out the data for modeling. Figure3 presents model data processing.Figure 3
Model data processing.


### 3.3. Data Cleaning

When the variables are selected, the data needs to be cleaned, including outlier processing, missing value processing, and data standardization.


#### 3.3.1. Outlier Processing

Since the outliers will produce errors in the estimation of the model parameters, we need to handle the outliers of the continuous variables in the dataset. In basic applied statistics, it is generally believed that values beyond three standard deviations are abnormal values. For the data set of this study, the data that may generate outlier is column AGE. We use SPSS software for processing as import data sets into SPSS, add a column ZAGE and then the values beyond three standard deviations, and finally mark the outliers of these data as NULL. We rechecked the data after marking and found that the minimum age is 10, while the maximum is 60. Considering that minors lack the ability to buy luxury goods, so we also marked 136 people aged 10 to 18 as NULL.


#### 3.3.2. Missing Value Processing

There are many methods to deal with missing values, such as delete missing data, average filling missing data, K-nearest neighbor filling missing data, regression filling missing data, and so on. There are missing values in column AGE and GND_MEMO in the original data set. In this paper, the linear interpolation method is used to supplement the missing values, and the related operations are specifically carried out in SPSS.


#### 3.3.3. Data Standardization

In machine learning, some algorithms need to standardize data, such as logistic regression algorithm, while some others do not, such as decision tree and artificial neural network algorithm. Since there are many algorithms involved in this paper, it is necessary to standardize the data. We use the deviation standardization method to linearly transform the raw data. The data normalized conversion function is as follows:(9)yik=xik−minxkmaxxk−minxk.The data after standardization can be seen in Figure4.Figure 4
Data standardization result.


### 3.4. Data Descriptive Statistics

Before modeling, it is usually necessary to have a general understanding of the data, so descriptive statistical analysis of the data is very important. In order to understand the overall structure of data sets more clearly, descriptive statistical analysis can be carried out separately for numerical variables and classified variables.


#### 3.4.1. Descriptive Statistics of Numerical Variables

The typical numerical data in this paper include age, total consumption, total quantity, and total costs. The descriptive statistics of numerical variables are set out in Table3.Table 3
Descriptive statistics of numerical variables.
NMinimumMaximumAverageStandard deviationAGE294345186031.367.520FREQ2943451941.622.049TTL_SPENDING294345−73461729262341.954169.208QTY294345−92303.555.443Effective294345————


#### 3.4.2. Descriptive Statistics of Classified Variables

The frequency statistic result of customer level is displayed in Table4.Table 4
Frequency statistic result of customer level.
Customer levelFrequencyPercentageEffective percentageAccumulated percentageEffective0200.00.00.0111400238.738.738.7213945047.447.486.134087213.913.9100.0Total294345100.0100.0—We define the customer label of the original data set as lost and sleeping as 0; the customer label as normal new; valuable new as level 1; the customer label as inactive, normal middle; valuable middle as level 2; the customer label as top vip; and vip as level 3. The higher the customer level, the higher the customer value, and of course, the more targeted marketing is.Similarly, the frequency statistic result of customer gender can be seen in Table5.Table 5
Frequency statistic result of customer gender.
Customer genderFrequencyPercentageEffective percentageAccumulated percentageEffective026763590.990.990.91267109.19.1100.0Total294345100.0100.0—We can see from Table5 that women account for about 90.9% of customers. Therefore, it is necessary to specialize in marketing for women.


### 3.5. Model Establishment

Based on the comparison of the classification algorithms above, this paper selects the fast and high precision decision tree algorithm for modeling. For the three tables of cosmetics, jewelry, and clothing, the model is established with a full amount of 294,345 data. Table6 compares the simulation result by the decision tree algorithm.Table 6
Simulation result by decision tree algorithm.
TableAccuracyErrorPrecision (positive)Recall (positive)Precision (negative)Recall (negative)F1 measureCosmetics0.9280.0760.1690.5690.9900.9360.546Jewelry0.9010.1030.2180.6000.9800.9080.635Clothing0.9350.0660.1770.5180.9850.9470.524We can see from Table6 that the model has high precision. However, the prediction accuracy of the three sets of data is as low as 16.9%, 21.8%, and 17.7%. The recall rates and F1 measure are also low.


### 3.6. Model Prediction

The model prediction results of table of cosmetics, jewelry, and clothing on the data set are set out in Figure5.Figure 5
Model prediction results of three tables: (a) jewelry, (b) cosmetics, and (c) clothing.
(a)(b)(c)From Figure5, it can be seen that the gap between predictions 1 and 0 is large and the stability is high. In order to observe the prediction accuracy of the model, the ROC curve is shown in Figure 6.Figure 6
ROC curve of the three tables: (a) jewelry (b) cosmetics, and (c) clothing.
(a)(b)(c)From Figure6, it can be seen that all the ROC curves are close to the longitudinal axis and far from the diagonal line. The AUC value of jewelry is predicted as 0.967, that of cosmetics is predicted as 0.821, and that of clothing is predicted as 0.855, all with high accuracy.


## 3.1. Case Background

In the field of cosmetics, especially in the high-end cosmetics field, which has been hot in recent years, the purchase demand of consumers is the most concerned issue of enterprises. Therefore, based on the theoretical research basis of the classification algorithm as above, this paper collects the sales data of luxury goods in a certain area and conducts the corresponding customer demand forecast analysis. We have chosen cosmetics, jewelry, and clothing, which are typical luxury consumer goods, to carry out empirical research on the marketing model. In the actual modeling process, the possibility that each consumer will purchase these three types of products will be predicted: 1 represents possible purchase, and 0 represents impossible purchase.The specific research ideas are as follows: firstly, collect purchase data of related commodities from July 1, 2017, to March 31, 2018, and then the original data are processed to sort out the variables needed for modeling into three tables: cosmetics, jewelry, and clothing. Taking table jewelry as an example, we define that if there is a jewelry-purchasing record in the first nine months, as well as in the last three months, then the explanatory variable is marked as 1. If there is no purchase record in the last three months, then the explanatory variable is marked as 0. In the three tables, all variables except the explained variable are the same.


## 3.2. Data Preparation

According to the case background, we selected 16 variables from the database. Figure2 displays model variables arrangement.Figure 2
Model variables arrangement.According to the above 16 variables, the consumption and quantity ratio of cosmetics, jewelry, and clothing is to be calculated. Together with other variables, which are quantified, we sorted out the data for modeling. Figure3 presents model data processing.Figure 3
Model data processing.


## 3.3. Data Cleaning

When the variables are selected, the data needs to be cleaned, including outlier processing, missing value processing, and data standardization.


### 3.3.1. Outlier Processing

Since the outliers will produce errors in the estimation of the model parameters, we need to handle the outliers of the continuous variables in the dataset. In basic applied statistics, it is generally believed that values beyond three standard deviations are abnormal values. For the data set of this study, the data that may generate outlier is column AGE. We use SPSS software for processing as import data sets into SPSS, add a column ZAGE and then the values beyond three standard deviations, and finally mark the outliers of these data as NULL. We rechecked the data after marking and found that the minimum age is 10, while the maximum is 60. Considering that minors lack the ability to buy luxury goods, so we also marked 136 people aged 10 to 18 as NULL.


### 3.3.2. Missing Value Processing

There are many methods to deal with missing values, such as delete missing data, average filling missing data, K-nearest neighbor filling missing data, regression filling missing data, and so on. There are missing values in column AGE and GND_MEMO in the original data set. In this paper, the linear interpolation method is used to supplement the missing values, and the related operations are specifically carried out in SPSS.


### 3.3.3. Data Standardization

In machine learning, some algorithms need to standardize data, such as logistic regression algorithm, while some others do not, such as decision tree and artificial neural network algorithm. Since there are many algorithms involved in this paper, it is necessary to standardize the data. We use the deviation standardization method to linearly transform the raw data. The data normalized conversion function is as follows:(9)yik=xik−minxkmaxxk−minxk.The data after standardization can be seen in Figure4.Figure 4
Data standardization result.


## 3.3.1. Outlier Processing

Since the outliers will produce errors in the estimation of the model parameters, we need to handle the outliers of the continuous variables in the dataset. In basic applied statistics, it is generally believed that values beyond three standard deviations are abnormal values. For the data set of this study, the data that may generate outlier is column AGE. We use SPSS software for processing as import data sets into SPSS, add a column ZAGE and then the values beyond three standard deviations, and finally mark the outliers of these data as NULL. We rechecked the data after marking and found that the minimum age is 10, while the maximum is 60. Considering that minors lack the ability to buy luxury goods, so we also marked 136 people aged 10 to 18 as NULL.


## 3.3.2. Missing Value Processing

There are many methods to deal with missing values, such as delete missing data, average filling missing data, K-nearest neighbor filling missing data, regression filling missing data, and so on. There are missing values in column AGE and GND_MEMO in the original data set. In this paper, the linear interpolation method is used to supplement the missing values, and the related operations are specifically carried out in SPSS.


## 3.3.3. Data Standardization

In machine learning, some algorithms need to standardize data, such as logistic regression algorithm, while some others do not, such as decision tree and artificial neural network algorithm. Since there are many algorithms involved in this paper, it is necessary to standardize the data. We use the deviation standardization method to linearly transform the raw data. The data normalized conversion function is as follows:(9)yik=xik−minxkmaxxk−minxk.The data after standardization can be seen in Figure4.Figure 4
Data standardization result.


## 3.4. Data Descriptive Statistics

Before modeling, it is usually necessary to have a general understanding of the data, so descriptive statistical analysis of the data is very important. In order to understand the overall structure of data sets more clearly, descriptive statistical analysis can be carried out separately for numerical variables and classified variables.


### 3.4.1. Descriptive Statistics of Numerical Variables

The typical numerical data in this paper include age, total consumption, total quantity, and total costs. The descriptive statistics of numerical variables are set out in Table3.Table 3
Descriptive statistics of numerical variables.
NMinimumMaximumAverageStandard deviationAGE294345186031.367.520FREQ2943451941.622.049TTL_SPENDING294345−73461729262341.954169.208QTY294345−92303.555.443Effective294345————


### 3.4.2. Descriptive Statistics of Classified Variables

The frequency statistic result of customer level is displayed in Table4.Table 4
Frequency statistic result of customer level.
Customer levelFrequencyPercentageEffective percentageAccumulated percentageEffective0200.00.00.0111400238.738.738.7213945047.447.486.134087213.913.9100.0Total294345100.0100.0—We define the customer label of the original data set as lost and sleeping as 0; the customer label as normal new; valuable new as level 1; the customer label as inactive, normal middle; valuable middle as level 2; the customer label as top vip; and vip as level 3. The higher the customer level, the higher the customer value, and of course, the more targeted marketing is.Similarly, the frequency statistic result of customer gender can be seen in Table5.Table 5
Frequency statistic result of customer gender.
Customer genderFrequencyPercentageEffective percentageAccumulated percentageEffective026763590.990.990.91267109.19.1100.0Total294345100.0100.0—We can see from Table5 that women account for about 90.9% of customers. Therefore, it is necessary to specialize in marketing for women.


## 3.4.1. Descriptive Statistics of Numerical Variables

The typical numerical data in this paper include age, total consumption, total quantity, and total costs. The descriptive statistics of numerical variables are set out in Table3.Table 3
Descriptive statistics of numerical variables.
NMinimumMaximumAverageStandard deviationAGE294345186031.367.520FREQ2943451941.622.049TTL_SPENDING294345−73461729262341.954169.208QTY294345−92303.555.443Effective294345————


## 3.4.2. Descriptive Statistics of Classified Variables

The frequency statistic result of customer level is displayed in Table4.Table 4
Frequency statistic result of customer level.
Customer levelFrequencyPercentageEffective percentageAccumulated percentageEffective0200.00.00.0111400238.738.738.7213945047.447.486.134087213.913.9100.0Total294345100.0100.0—We define the customer label of the original data set as lost and sleeping as 0; the customer label as normal new; valuable new as level 1; the customer label as inactive, normal middle; valuable middle as level 2; the customer label as top vip; and vip as level 3. The higher the customer level, the higher the customer value, and of course, the more targeted marketing is.Similarly, the frequency statistic result of customer gender can be seen in Table5.Table 5
Frequency statistic result of customer gender.
Customer genderFrequencyPercentageEffective percentageAccumulated percentageEffective026763590.990.990.91267109.19.1100.0Total294345100.0100.0—We can see from Table5 that women account for about 90.9% of customers. Therefore, it is necessary to specialize in marketing for women.


## 3.5. Model Establishment

Based on the comparison of the classification algorithms above, this paper selects the fast and high precision decision tree algorithm for modeling. For the three tables of cosmetics, jewelry, and clothing, the model is established with a full amount of 294,345 data. Table6 compares the simulation result by the decision tree algorithm.Table 6
Simulation result by decision tree algorithm.
TableAccuracyErrorPrecision (positive)Recall (positive)Precision (negative)Recall (negative)F1 measureCosmetics0.9280.0760.1690.5690.9900.9360.546Jewelry0.9010.1030.2180.6000.9800.9080.635Clothing0.9350.0660.1770.5180.9850.9470.524We can see from Table6 that the model has high precision. However, the prediction accuracy of the three sets of data is as low as 16.9%, 21.8%, and 17.7%. The recall rates and F1 measure are also low.


## 3.6. Model Prediction

The model prediction results of table of cosmetics, jewelry, and clothing on the data set are set out in Figure5.Figure 5
Model prediction results of three tables: (a) jewelry, (b) cosmetics, and (c) clothing.
(a)(b)(c)From Figure5, it can be seen that the gap between predictions 1 and 0 is large and the stability is high. In order to observe the prediction accuracy of the model, the ROC curve is shown in Figure 6.Figure 6
ROC curve of the three tables: (a) jewelry (b) cosmetics, and (c) clothing.
(a)(b)(c)From Figure6, it can be seen that all the ROC curves are close to the longitudinal axis and far from the diagonal line. The AUC value of jewelry is predicted as 0.967, that of cosmetics is predicted as 0.821, and that of clothing is predicted as 0.855, all with high accuracy.


## 4. Conclusion

Through unbalanced treatment of interpreted variables, the accuracy of model prediction 1 has been significantly improved. Among them, the prediction accuracy of 1 in the table jewelry has been greatly improved to 80.6%, and prediction accuracy of clothing has been greatly improved to 86.5%. In this way, according to the predicted results, the merchants can count the different needs of each individual; integrate the cosmetics, jewelry, and clothing categories that consumers are interested in; carry out personalized marketing strategies for the customers who will buy these products; and ultimately improve marketing efficiency and customer satisfaction.A personalized marketing strategy model can be applied not only in the luxury goods industry but also in many other Internet industries. For example, for music APP, according to the user’s history of listening to songs, we can recommend songs that meet the user’s preferences. The media can recommend interesting news to tourists according to their habit of browsing news. According to the characteristics of eating habits, the third-party ordering platform recommends restaurants that match the characteristics. You can even use investment preferences or sensational insights to recommend investment channels such as specific stocks. There is no doubt that personalized recommendations save people time and intimacy when using a variety of products.



---

*Source: 6511552-2021-10-19.xml*