2022 National Undergraduate Mathematical Contest in Modeling E topic - detailed explanation of small batch material production arrangement + ideas + Python code time series prediction model (2)

Table of contents

foreword

1. Trend refinement

method

2. Refinement analysis of sales unit price

3. Algorithm screening

1. Calculation of indicator weights

2. Ranking

 3. Calculate the rank sum ratio RSR value

​edit

4. Binning.

The modeling part will be written later. If you want to know more, welcome to add bloggers WeChat, get the code for free and more detailed ideas + models!

Pay attention, prevent getting lost, if there are any mistakes, please leave a message for advice, thank you very much


foreword

依旧是紧接着上篇文章内容哈,这次我们将更加精细化的将第一问的时间序列模型给全部做出来:

2022 National Undergraduate Mathematical Contest in Modeling E Topic - Detailed Explanation of Small Batch Material Production Arrangement + Ideas + Python Code Time Series Prediction Model (1) - Fanstuck's Blog - CSDN Blog

 This article mainly makes up for the problems of data trends and sales unit prices left over from the previous article, and completes the time series prediction model. It can be said that the workload is full, so now we start to model step by step. .


1. Trend refinement

First of all, we should think according to the actual data. The ones that can reflect the fluctuation trend of material demand do not need to be so complicated. After all, there are 283 types of materials. If we do a trend analysis for each material, it will inevitably waste too much time, and many materials The frequency of demand is only one or two, which greatly affects the judgment. Therefore, we use comprehensive statistical indicators to evaluate here.

method

Since it is a trend here, then we can use the sigmoid function to achieve a normalization operation, and the mean value can be used as a trend indicator after normalizing the data.

 As early as the beginning, I analyzed the trends by transforming them into dimensionless data. After normalizing the data, I integrated the discreteness of the data, and then only got their trends according to the mean comparison. In this way, the numerical value of the demand is avoided. influence to get a more accurate trend scalar. We only need to choose a scalar that tends to be larger, which shows that our demand is gradually increasing, which is more in line with the properties of important materials.

 In this way, we have solved the trend problem, then the next step is the sales unit price.

2. Refinement analysis of sales unit price

There may be many students and friends here who think that the unit price is not necessarily the lowest or the highest. Do you think that the unit price does not change according to the demand? You simply use a unit price to analyze, without looking at the demand. For example, if a material is sold for 10, and a material is sold for 20, you can choose to sell 10 yuan, but only 20 pieces of 10 yuan materials are needed, and 30 pieces are required to sell 20 pieces?

Let's take a look at this data:

 This is almost 2000 short, but if you take their average price you lose quite a bit of information.

And according to the data observation, we also found that the sales unit price also fluctuates according to time, so we can completely analyze it according to the previous demand strategy, and first integrate the sales unit price and demand into cost indicators:

 After that, average the aggregated data to obtain the average daily demand amount. Then this indicator is integrated with the unit sales price. When the indicator is larger, it means that the material is more worthy of attention:

In this way, we have collected all the reference elements, combined them again, and got the final modeling dataset:

Now we can determine the final six materials to focus on based on the final data.

3. Algorithm screening

Decision Algorithms I've written about many models, including:

The Principle and Application of Analytic Hierarchy Process (AHP)

A quick study - entropy weight method to determine the weight of evaluation indicators - Fanstuck's blog - CSDN blog - Entropy weight method to determine the weight

Rank sum ratio comprehensive evaluation method (RSR) detailed explanation and Python implementation and application - Fanstuck's blog - CSDN blog - rsr method

Here I choose the more comprehensive RSR rank sum ratio comprehensive evaluation method:

The general process is to rank the benefit-type indicators from small to large, and the cost-type indicators from large to small, then calculate the rank sum ratio, and finally perform statistical regression and binning. Through the rank transformation, the dimensionless statistic RSR is obtained; on this basis, the concept and method of parametric statistical analysis are used to study the distribution of RSR; the RSR value is used to directly rank the pros and cons of the evaluation objects or rank the evaluation objects. Make a comprehensive evaluation.

1. Calculation of indicator weights

When evaluating the results, we know that the weights of the influencing factors are inconsistent. We need to calculate the weights of each indicator first and then perform the weighted rank sum ratio, otherwise the information difference between each indicator will be meaningless.

The methods for calculating the weight of indicators include AHP, entropy weight method or custom weight. The author has written both AHP and entropy weight method.

Here we use the entropy weight method to get the weights:

Thereby, the corresponding weights are obtained, and then the

2. Ranking

Use the whole rank method:

In a nmatrixm of rows and columns, the corresponding RSR calculation formula is:

RSR_{i}=\frac{1}{n*m}\sum_{j=1}^{m}R_{ij}

Among them i=1,2,...,n; j=1,2...,m, R_{ij}is expressed as the rank of the irow-th jcolumn-th element.

When the weights of the evaluation indicators are different, the weighted rank sum ratio is calculated as

WRSR_{i}=\frac{1}{n}\sum_{j=1}^{m}W_{j}R_{ij}

W_{j}Indicates the jweight of the first index. The RSR value is dimensionless, with a minimum \frac{1}{n}value of 1 and a maximum value of 1.

 3. Calculate the rank sum ratio RSR value

4. Binning.

According to the estimated RSR value calculated by the regression equation, the evaluation objects are sorted into bins, and the number of bins is determined by the researchers according to the actual situation.  

● By comparing the RSR fitted value and the RSR threshold (fitted value) in the previous table, the binning level is obtained;

● The larger the number of the grading level, the higher the level, that is, the better the effect.

Get the final six most important material codes.

The modeling part will be written later. If you want to know more, welcome to add bloggers WeChat, get the code for free and more detailed ideas + models!

Pay attention, prevent getting lost, if there are any mistakes, please leave a message for advice, thank you very much

That's all for this issue. I'm fanstuck. If you have any questions, feel free to leave a message to discuss. See you in the next issue.


Guess you like

Origin blog.csdn.net/master_hunter/article/details/126889884