Product sales prediction method based on ARIMA-NARX combined prediction model

By adopting the ARIMA-NARX combination prediction model in product sales forecasting, combining historical sales data and online review data, the problem of difficult nonlinear relationships and important influencing factors in the existing technology is solved, and higher prediction accuracy and lower prediction errors are achieved.

CN119941318APending Publication Date: 2025-05-06BEIJING TECH & BUSINESS UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510037420.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

It is difficult for the prior art to effectively consider important influencing factors such as nonlinear relationships and online reviews in product sales forecasts, resulting in insufficient prediction accuracy.

Method used

Using a method based on ARIMA-NARX combined prediction model, combining autoregressive integral sliding average model (ARIMA) and nonlinear autorecursive external input model (NARX), we integrate historical sales data and online review data, and establish a more accurate sales prediction model through feature engineering and sentiment analysis.

Benefits of technology

It improves the accuracy of product sales forecasts, can more effectively capture the impact of nonlinear relationships in the time series and online reviews on sales, and reduces prediction errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119941318A_ABST
    Figure CN119941318A_ABST
Patent Text Reader

Abstract

The invention relates to a product sales volume prediction method based on an ARIMA-NARX combined prediction model, which combines online comments and other time sales volume influence characteristics to predict the sales volume of a product, is an innovative and important attempt, can realize a more accurate prediction result, integrates various emotion dictionaries, and improves the product sales volume prediction efficiency. The method brings the opportunities of expansion of vocabulary coverage, improvement of emotion polarity accuracy, balance of emotion prejudice and reference and verification. The multi-dictionary integration method provides a more comprehensive, accurate and reliable sentiment analysis result, provides valuable contribution to sentiment analysis research and application fields, verifies the ARIMA-NARX combined prediction model provided by the research by applying real case data, and compares the ARIMA-NARX combined prediction model with other single or combined prediction models, so that the sentiment analysis result is more accurate and reliable. The result shows that the combined prediction model is obviously reduced in the aspect of error rate, so that the prediction accuracy is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sales forecasting, and in particular to a product sales forecasting method based on an ARIMA-NARX combined forecasting model. Background Art

[0002] In the fierce market competition, the importance of sales forecasting to enterprises cannot be ignored. Accurate sales forecasting helps enterprises formulate production plans, make effective management decisions, reduce losses, increase profits, and improve competitiveness. By avoiding overproduction and inventory backlogs, enterprises can optimize resource utilization, reduce costs, and improve efficiency and profits. Accurate sales forecasting also provides basic data for strategic management decisions, helping enterprises adjust market strategies, optimize supply chains, and adapt to market changes. Therefore, accurate sales forecasting is of great significance in the fierce market competition.

[0003] For example, a product sales forecasting method proposed in 202210862555.1 uses the characteristics of the product's historical sales volume and other influencing factors to build a regression model for rolling forecasting, a deep learning model, and a deep learning model that removes outliers. Then, the constructed multiple models are regressed and integrated to build the final multi-model integrated regression forecasting learner, thereby accurately predicting the future sales of the product.

[0004] The relationship between product sales and related influencing factors is often complex and diverse, including both linear and nonlinear relationships. However, most existing technologies only focus on linear relationships, and research on nonlinear relationships is relatively limited. In addition, online reviews are an important consumer feedback and influencing factor, but there are few sales forecasting methods that comprehensively consider online reviews with other dimensional influencing factors. Therefore, a product sales forecasting method based on the ARIMA-NARX combined forecasting model is proposed to solve the above problems. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present invention provides a product sales forecasting method based on the ARIMA-NARX combined forecasting model, which combines the autoregressive integrated moving average model (ARIMA) and the nonlinear self-recursive external input model (NARX) to more accurately predict product sales. The ARIMA model is suitable for modeling and forecasting linear relationships. It can capture trends, seasonality and periodicity in time series data and provide forecasts for future sales. The NARX model is introduced as a supplement to the ARIMA model. The nonlinear relationship between the external input variables and the target variable is comprehensively considered.

[0006] To achieve the above object, the present invention provides the following technical solution: a product sales forecasting method based on the ARIMA-NARX combined forecasting model, comprising the following steps:

[0007] Step 1: Data collection and preprocessing

[0008] Collect historical sales data and online review data, and perform dimensionless transformation, missing value supplementation, and categorical feature conversion on the collected data;

[0009] Step 2: Emotional Scoring

[0010] Integrate CNKI sentiment dictionary, Li Jun sentiment dictionary of Tsinghua University, BosonNLP sentiment dictionary and negation dictionary as sentiment dictionary, pre-process the non-text online comment data of pictures, emoticons and links, use Jieba to segment and tag the Chinese sentences in the text online comment data, and classify the processed online comment emotions into positive emotions and negative emotions through naive Bayes classifier. Based on the principle of naive Bayes classifier, and involving Bayes theorem and naive Bayes hypothesis, calculate the sentiment score S of different periods t ;

[0011] Step 3: Feature Engineering

[0012] Through feature extraction, feature derivation, feature selection and feature dimension reduction, the original data is transformed, selected, constructed and normalized to extract useful information that can represent the data characteristics and create a more informative and expressive feature set;

[0013] Step 4: Establish ARIMA-NARX combined forecasting model

[0014] Use the ARIMA model to make a preliminary forecast of the time series and the forecast results Compare it with the actual value Y to get the residual sequence ε; then use the series of feature sets Xi obtained by sentiment scoring and feature engineering as input data, and the residual sequence ε as output data to establish the NARX network in series-parallel mode to get the prediction result ε; finally, use it to replace the preliminary prediction residual ε, that is, the prediction result

[0015] Further, the online review data includes the title of the review attribute, the attribute score, the review publishing time, the most satisfactory aspect, the least satisfactory aspect, the detailed review content, the number of review viewers and the number of review likes;

[0016] Attribute ratings, review posting time, number of review viewers, and number of review likes are quantitative data that do not require sentiment processing and are directly used for quantitative and statistical analysis;

[0017] The most satisfactory aspects, the least satisfactory aspects and the detailed comments under the corresponding attribute titles need to be processed through sentiment analysis and other technologies to obtain the user's emotional attitudes and opinions.

[0018] Furthermore, the data dimensionless conversion converts data with different specifications or different distributions into data with the same specifications or specific distributions, the missing value supplementation uses the Holt-Winters algorithm to smooth the missing data, and the classification feature conversion converts text-type classification features into numerical types.

[0019] Furthermore, when the non-text online review data is processed:

[0020] For links contained in comments, remove them or replace them with generic placeholders;

[0021] The pictures and emoticons in the comments are defined as repeated expressions of emotions in the text. Since they appear less frequently in the collected online comment data and have no impact on the sentiment analysis results, they are removed.

[0022] Furthermore, when the sentiment is scored:

[0023] E+ represents positive sentiment, E- represents negative sentiment, and the sentiment of each comment is classified by the naive Bayes classifier to obtain the corresponding sentiment score;

[0024] The sentiment word set is represented by D∈R, and the sentiment word set in the crawled public opinion information is represented by D k ∈R k (k=1,2,3……n) represents, n represents the number of comments in the public opinion information;

[0025] Wkm represents the sentiment word set D in public opinion information k The mth sentiment word in D k Belong to E i The probability of a class, i∈{+,-}, is calculated as follows:

[0026]

[0027] Where P(E i ) is the probability of the ith category, which can be estimated using the number of positive and negative categories in the training set, P(D k ) is the probability of a specific set of sentiment words appearing, P(D k |E i ) is D k The terms in category E i The probability of

[0028] Probability P(D k |E i ) is calculated as follows:

[0029] P(D k |Ei )=P(w k1 , w k2 , w k3 ...w km |E i )

[0030] The naive Bayes classifier assumes that the features are conditionally independent. The conditional independence between features means that for a given sentiment label, the value of each feature is independent. The assumption simplifies the joint probability distribution to the product of the conditional probabilities of each feature, that is:

[0031]

[0032] Where P(W km |Ei) is W km The probability of appearing in Ei;

[0033] The sentiment score S in the time period T t for:

[0034]

[0035] Furthermore, the feature derivation combines or transforms existing features or creates new features based on domain knowledge to extract more useful information or improve the expressiveness of features.

[0036] Furthermore, the feature screening sets a variance threshold and selects features whose variance exceeds the threshold. The variance calculation process is as follows:

[0037]

[0038] Where X i (i=1,2,3……n) represents the value of each sample, n represents the number of samples, represents the average value of a feature;

[0039] In feature selection, the amount of information provided by the feature for predicting the target variable is calculated by the mutual information method to capture the nonlinear relationship and complex correlation mutual information between the feature and the target variable. The calculation formula is as follows:

[0040]

[0041] Where p(x,y) is the joint probability of random variables X and Y taking values ​​of x and y at the same time, which indicates the probability of X and Y occurring at the same time; p(x) is the probability of random variable X taking value of x, which indicates the probability of X occurring; p(y) is the probability of random variable Y taking value of y, which indicates the probability of Y occurring; (p(x,y) / (p(x)*p(y))) indicates the ratio of the joint probability of X and Y occurring at the same time to the probability of X and Y occurring independently;

[0042] The correlation between X and Y measures the degree of difference between the joint probability and the independent probability. By calculating the joint probability and marginal probability of each value combination (x, y) and substituting them into the formula of mutual information, we can get the mutual information value between X and Y. The larger the value of mutual information, the stronger the correlation between X and Y, and the greater the amount of information provided.

[0043] Furthermore, the feature dimension reduction adopts PCA principal component analysis method, and the steps of PCA feature dimension reduction are as follows:

[0044] (1) Data standardization: The original data is standardized so that the mean of each feature is 0 and the variance is 1 to eliminate the influence of different scales. The calculation formula of the standardized data matrix Z is as follows:

[0045] Z=(X-μ) / σ

[0046] Where X is the original data matrix, μ is the mean vector of the feature, and σ is the standard deviation vector of the feature;

[0047] (2) Calculate the covariance matrix: Calculate the covariance matrix of the standardized data to describe the correlation between data features. The calculation formula of the covariance matrix C is:

[0048] C=(1 / m)*Z^T*Z

[0049] Where m is the number of samples and Z is the standardized data matrix;

[0050] (3) Calculate eigenvalues ​​and eigenvectors and select principal components: Perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues ​​and corresponding eigenvectors, and perform eigenvalue decomposition on the covariance matrix C to obtain eigenvalues ​​λ and eigenvectors V;

[0051] The eigenvalue λ represents the variance of the principal component, the eigenvector V represents the direction of the principal component, and the number of principal components k to be retained is selected based on the size of the eigenvalue;

[0052] (4) Projection data: Project the standardized data matrix Z onto the first k selected eigenvectors to obtain the reduced-dimensional data matrix Y.

[0053] Y=Z*V_k

[0054] Among them, Y is the data matrix after dimensionality reduction, X is the data matrix after standardization, and V_k is the matrix composed of the first k eigenvectors.

[0055] Furthermore, the desired output in the NARX neural network training is known, and a neural network in series-parallel mode is established. The NARX network can learn and capture nonlinear relationships in time series, and the NARX network uses external input to make predictions.

[0056] Compared with the prior art, the technical solution of this application has the following beneficial effects:

[0057] 1. The present invention combines online reviews and other time sales influencing features to predict product sales, which is an innovative and significant attempt and can achieve more accurate prediction results.

[0058] 2. The present invention integrates multiple sentiment dictionaries, which expands the vocabulary coverage, improves the accuracy of sentiment polarity, balances sentiment bias, and provides opportunities for reference and verification. This multi-dictionary integration approach provides more comprehensive, accurate, and reliable sentiment analysis results, making a valuable contribution to the field of sentiment analysis research and application.

[0059] 3. The present invention verifies the ARIMA-NARX combined prediction model proposed in this study by applying real case data, and compares it with other single or combined prediction models. The results show that the combined prediction model shows a significant reduction in error rate, thereby greatly improving the prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 It is the overall framework diagram of the present invention;

[0061] Figure 2 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0063] See also Figure 1-2 In this embodiment, a product sales forecasting method based on the ARIMA-NARX combined forecasting model includes the following steps:

[0064] Step 1: Data collection and preprocessing

[0065] Collect historical sales data and online review data, and perform dimensionless transformation, missing value supplementation, and categorical feature conversion on the collected data;

[0066] Step 2: Emotional Scoring

[0067] Integrate CNKI sentiment dictionary, Li Jun sentiment dictionary of Tsinghua University, BosonNLP sentiment dictionary and negation dictionary as sentiment dictionary, pre-process the non-text online comment data of pictures, emoticons and links, use Jieba to segment and tag the Chinese sentences in the text online comment data, and classify the processed online comment emotions into positive emotions and negative emotions through naive Bayes classifier. Based on the principle of naive Bayes classifier, and involving Bayes theorem and naive Bayes hypothesis, calculate the sentiment score S of different periods t ;

[0068] Step 3: Feature Engineering

[0069] Through feature extraction, feature derivation, feature selection and feature dimension reduction, the original data is transformed, selected, constructed and normalized to extract useful information that can represent the data characteristics and create a more informative and expressive feature set;

[0070] Step 4: Establish ARIMA-NARX combined forecasting model

[0071] Use the ARIMA model to make a preliminary forecast of the time series and the forecast results Compare it with the actual value Y to get the residual sequence ε; then use the series of feature sets Xi obtained by sentiment scoring and feature engineering as input data, and the residual sequence ε as output data to establish the NARX network in series-parallel mode to get the prediction result ε; finally, use it to replace the preliminary prediction residual ε, that is, the prediction result

[0072] In this embodiment, product sales forecasting includes the following steps:

[0073] (1) Data collection and preprocessing: collect product sales data and online review data, and then preprocess the collected data, including eliminating invalid data, filling in missing data, and quantifying the data;

[0074] (2) Sentiment scoring and feature engineering: First, we analyze the review data and calculate the sentiment score based on the time period. We regard the sentiment score as an important feature that affects product sales. Then, we conduct feature engineering analysis based on the factors affecting the demand for the product itself and its derivatives.

[0075] (3) Establish a combined forecasting model and use the complementarity of ARIMA and NARX to establish an ARIMA-NARX combined forecasting model;

[0076] (4) Verify and analyze the rationality and performance of the model, use the obtained sales and online review data to conduct fitting experiments on the combined model, use reasonable standards to verify the rationality and performance of the model, and then compare it with other models to verify the prediction effect of the combined model.

[0077] In this embodiment, the information extracted from online comments can be divided into two categories: one is quantitative data that does not require sentiment processing, including attribute scores, comment publishing time, number of review viewers, and number of review likes. These data can be directly used for quantitative and statistical analysis without sentiment processing;

[0078] The other category is text data that requires sentiment processing, including the most satisfactory and least satisfactory aspects, as well as detailed comments under the corresponding attribute titles. These text data need to be processed through sentiment analysis and other technologies to obtain users' emotional attitudes and opinions. By combining these text data with quantitative data, we can more accurately understand users' emotional tendencies and evaluations of products or services.

[0079] In this embodiment, the dimensionless method can reduce the impact of outliers on the model, because these methods are relatively insensitive to outliers, avoiding the distortion of model training and prediction results by outliers, making the model more robust and reliable;

[0080]

[0081] Where x is the sequence to be converted, μ and σ are the mean and standard deviation of x respectively. x is centered by μ and scaled by σ to obtain the sequence x*~N(0,1).

[0082] In this embodiment, E+ represents positive emotions, E- represents negative emotions, and the sentiment classification of each comment is performed using a naive Bayes classifier to obtain a corresponding sentiment score;

[0083] The sentiment word set is represented by D∈R, and the sentiment word set in the crawled public opinion information is represented by D k ∈R k (k=1,2,3……n) represents, n represents the number of comments in the public opinion information;

[0084] Wkm represents the sentiment word set D in public opinion information k The mth sentiment word in D k Belong to E i The probability of a class, i∈{+,-}, is calculated as follows:

[0085]

[0086] Where P(E i) is the probability of the ith category, which can be estimated using the number of positive and negative categories in the training set, P(D k ) is the probability of a specific set of sentiment words appearing, P(D k |E i ) is D k The terms in category E i The probability of

[0087] Probability P(D k |E i ) is calculated as follows:

[0088] P(D k |E i )=P(w k1 , w k2 , w k3 ...w km |E i )

[0089] The naive Bayes classifier assumes that the features are conditionally independent. The conditional independence between features means that for a given sentiment label, the value of each feature is independent. The assumption simplifies the joint probability distribution to the product of the conditional probabilities of each feature, that is:

[0090]

[0091] Where P(W km |Ei) is W km The probability of appearing in Ei;

[0092] The sentiment score S in the time period T t for:

[0093]

[0094] In this embodiment, feature screening sets a variance threshold and selects features whose variance exceeds the threshold. The variance calculation process is as follows:

[0095]

[0096] Where X i (i=1,2,3……n) represents the value of each sample, n represents the number of samples, represents the average value of a feature;

[0097] In feature selection, the amount of information provided by the feature for predicting the target variable is calculated by the mutual information method to capture the nonlinear relationship and complex correlation mutual information between the feature and the target variable. The calculation formula is as follows:

[0098]

[0099] Where p(x,y) is the joint probability of random variables X and Y taking values ​​of x and y at the same time, which indicates the probability of X and Y occurring at the same time; p(x) is the probability of random variable X taking value of x, which indicates the probability of X occurring; p(y) is the probability of random variable Y taking value of y, which indicates the probability of Y occurring; (p(x,y) / (p(x)*p(y))) indicates the ratio of the joint probability of X and Y occurring at the same time to the probability of X and Y occurring independently;

[0100] The correlation between X and Y measures the degree of difference between the joint probability and the independent probability. By calculating the joint probability and marginal probability of each value combination (x, y) and substituting them into the formula of mutual information, we can get the mutual information value between X and Y. The larger the value of mutual information, the stronger the correlation between X and Y, and the greater the amount of information provided.

[0101] In this embodiment, the feature dimension reduction adopts the PCA principal component analysis method, and the steps of PCA feature dimension reduction are as follows:

[0102] (1) Data standardization: The original data is standardized so that the mean of each feature is 0 and the variance is 1 to eliminate the influence of different scales. The calculation formula of the standardized data matrix Z is as follows:

[0103] Z=(X-μ) / σ

[0104] Where X is the original data matrix, μ is the mean vector of the feature, and σ is the standard deviation vector of the feature;

[0105] (2) Calculate the covariance matrix: Calculate the covariance matrix of the standardized data to describe the correlation between data features. The calculation formula of the covariance matrix C is:

[0106] C=(1 / m)*Z^T*Z

[0107] Where m is the number of samples and Z is the standardized data matrix;

[0108] (3) Calculate eigenvalues ​​and eigenvectors and select principal components: Perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues ​​and corresponding eigenvectors, and perform eigenvalue decomposition on the covariance matrix C to obtain eigenvalues ​​λ and eigenvectors V;

[0109] The eigenvalue λ represents the variance of the principal component, the eigenvector V represents the direction of the principal component, and the number of principal components k to be retained is selected based on the size of the eigenvalue;

[0110] (4) Projection data: Project the standardized data matrix Z onto the first k selected eigenvectors to obtain the reduced-dimensional data matrix Y.

[0111] Y=Z*V_k

[0112] Among them, Y is the data matrix after dimensionality reduction, X is the data matrix after standardization, and V_k is the matrix composed of the first k eigenvectors.

[0113] In summary, the present invention combines online reviews and other time-influencing sales features to predict product sales, which is an innovative and significant attempt, and can achieve more accurate prediction results. The integration of multiple sentiment dictionaries has brought about the expansion of vocabulary coverage, the improvement of sentiment polarity accuracy, the balance of sentiment bias, and the opportunity for reference and verification. This multi-dictionary integration method provides more comprehensive, accurate and reliable sentiment analysis results, and provides valuable contributions to the research and application fields of sentiment analysis. The ARIMA-NARX combined prediction model proposed in this study was tested by applying real case data and compared with other single or combined prediction models. The results show that the combined prediction model shows a significant reduction in error rate, thereby greatly improving the prediction accuracy.

[0114] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0115] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A product sales forecasting method based on the ARIMA-NARX combined forecasting model, characterized in that: The steps include: Step 1: Data collection and preprocessing Collect historical sales data and online review data, and perform dimensionless transformation, missing value supplementation, and categorical feature conversion on the collected data; Step 2: Emotional Scoring Integrate CNKI sentiment dictionary, Li Jun sentiment dictionary of Tsinghua University, BosonNLP sentiment dictionary and negation dictionary as sentiment dictionary, pre-process the non-text online comment data of pictures, emoticons and links, use Jieba to segment and tag the Chinese sentences in the text online comment data, and classify the processed online comment emotions into positive emotions and negative emotions through naive Bayes classifier. Based on the principle of naive Bayes classifier, and involving Bayes theorem and naive Bayes hypothesis, calculate the sentiment score S of different periods t ; Step 3: Feature Engineering Through feature extraction, feature derivation, feature selection and feature dimension reduction, the original data is transformed, selected, constructed and normalized to extract useful information that can represent the data characteristics and create a more informative and expressive feature set; Step 4: Establish ARIMA-NARX combined forecasting model Use the ARIMA model to make a preliminary forecast of the time series and the forecast results Compare it with the actual value Y to get the residual sequence ε; then use the series of feature sets Xi obtained by sentiment scoring and feature engineering as input data, and the residual sequence ε as output data to establish the NARX network in series-parallel mode to get the prediction result ε; finally, use it to replace the preliminary prediction residual ε, that is, the prediction result 2. The product sales forecasting method based on the ARIMA-NARX combined forecasting model according to claim 1 is characterized in that: The online review data includes the title of the review attribute, attribute score, review posting time, most satisfactory aspect, least satisfactory aspect, detailed review content, number of review viewers, and number of review likes; Attribute ratings, review posting time, number of review viewers, and number of review likes are quantitative data that do not require sentiment processing and are directly used for quantitative and statistical analysis; The most satisfactory aspects, the least satisfactory aspects and the detailed comments under the corresponding attribute titles need to be processed through sentiment analysis and other technologies to obtain the user's emotional attitudes and opinions.

3. The product sales forecasting method based on the ARIMA-NARX combined forecasting model according to claim 1 is characterized in that: The data dimensionless conversion converts data with different specifications or different distributions into data with the same specifications or specific distributions, the missing value supplementation uses the Holt-Winters algorithm to smooth the missing data, and the classification feature conversion converts text-type classification features into numerical types.

4. The product sales forecasting method based on the ARIMA-NARX combined forecasting model according to claim 1 is characterized in that: When processing the non-text online review data: For links contained in comments, remove them or replace them with generic placeholders; The pictures and emoticons in the comments are defined as repeated expressions of emotions in the text. Since they appear less frequently in the collected online comment data and have no impact on the sentiment analysis results, they are removed.

5. The product sales forecasting method based on the ARIMA-NARX combined forecasting model according to claim 1 is characterized in that: When the sentiment is scored: E+ represents positive sentiment, E- represents negative sentiment, and the Naive Bayes classifier is used to classify the sentiment of each comment and obtain the corresponding sentiment score; The sentiment word set is represented by D∈R, and the sentiment word set in the crawled public opinion information is represented by D k ∈R k (k=1,2,3……n) represents, n represents the number of comments in the public opinion information; Wkm represents the sentiment word set D in public opinion information k The mth sentiment word in D k Belong to E i The probability of a class, i∈{+,-}, is calculated as follows: Where P(E i ) is the probability of the ith category, which can be estimated using the number of positive and negative categories in the training set, P(D k ) is the probability of a specific set of sentiment words appearing, P(D k |E i ) is D k The terms in category E i The probability of Probability P(D k |E i ) is calculated as follows: P(D k |E i )=P(w k1 ,w k2 ,w k3 ……w km |E i ) The naive Bayes classifier assumes that the features are conditionally independent. The conditional independence between features means that for a given sentiment label, the value of each feature is independent. The assumption simplifies the joint probability distribution to the product of the conditional probabilities of each feature, that is: Where P(W km |Ei) is W km Appears in E i The probability of The sentiment score S in the time period T t for:

6. The product sales forecasting method based on the ARIMA-NARX combined forecasting model according to claim 1 is characterized in that: The feature derivation combines or transforms existing features or creates new features based on domain knowledge to extract more useful information or improve the expressiveness of features.

7. The product sales forecasting method based on the ARIMA-NARX combined forecasting model according to claim 1 is characterized in that: The feature screening sets a variance threshold and selects features whose variance exceeds the threshold. The variance calculation process is as follows: Where X i (i=1,2,3……n) represents the value of each sample, n represents the number of samples, represents the average value of a feature; In feature selection, the amount of information provided by the feature for predicting the target variable is calculated by the mutual information method to capture the nonlinear relationship and complex correlation mutual information between the feature and the target variable. The calculation formula is as follows: Where p(x,y) is the joint probability of random variables X and Y taking values ​​of x and y at the same time, which indicates the probability of X and Y occurring at the same time; p(x) is the probability of random variable X taking value of x, which indicates the probability of X occurring; p(y) is the probability of random variable Y taking value of y, which indicates the probability of Y occurring; (p(x,y) / (p(x)*p(y))) indicates the ratio of the joint probability of X and Y occurring at the same time to the probability of X and Y occurring independently; The correlation between X and Y measures the degree of difference between the joint probability and the independent probability. By calculating the joint probability and marginal probability of each value combination (x, y) and substituting them into the formula of mutual information, we can get the mutual information value between X and Y. The larger the value of mutual information, the stronger the correlation between X and Y, and the greater the amount of information provided.

8. The product sales forecasting method based on the ARIMA-NARX combined forecasting model according to claim 1 is characterized in that: The feature dimension reduction adopts PCA principal component analysis method, and the steps of PCA feature dimension reduction are as follows: (1) Data standardization: The original data is standardized so that the mean of each feature is 0 and the variance is 1 to eliminate the influence of different scales. The calculation formula of the standardized data matrix Z is as follows: Z=(X-μ) / σ Where X is the original data matrix, μ is the mean vector of the feature, and σ is the standard deviation vector of the feature; (2) Calculate the covariance matrix: Calculate the covariance matrix of the standardized data to describe the correlation between data features. The calculation formula of the covariance matrix C is: C=(1 / m)*Z^T*Z Where m is the number of samples and Z is the standardized data matrix; (3) Calculate eigenvalues ​​and eigenvectors and select principal components: Perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues ​​and corresponding eigenvectors, and perform eigenvalue decomposition on the covariance matrix C to obtain eigenvalues ​​λ and eigenvectors V; The eigenvalue λ represents the variance of the principal component, the eigenvector V represents the direction of the principal component, and the number of principal components k to be retained is selected based on the size of the eigenvalue; (4) Projection data: Project the standardized data matrix Z onto the first k selected eigenvectors to obtain the reduced-dimensional data matrix Y. Y=Z*V_k Among them, Y is the data matrix after dimensionality reduction, X is the data matrix after standardization, and V_k is the matrix composed of the first k eigenvectors.

9. The product sales forecasting method based on the ARIMA-NARX combined forecasting model according to claim 1 is characterized in that: The desired output in the NARX neural network training is known, and a neural network in series-parallel mode is established. The NARX network can learn and capture nonlinear relationships in time series, and the NARX network uses external inputs for prediction.

Citation Information

Patent Citations

  • A method for forecasting commodity sales

    CN115115416B