A complete explanation of the 2023 Huashu Cup Mathematical Modeling C Question Paper on the Effect of Mothers on Infants

Hello everyone, from the release of the competition questions yesterday until now, I have finally completed the complete paper on Question C of Wasu Cup Mathematical Modeling.

This paper can guarantee originality and high quality. It is by no means a junk semi-finished paper that just quotes a lot of models and codes and copies and pastes them in without any application to fool people.

The paper for Question C has a total of 72 pages, including 7 pages of revision instructions, 54 pages of main text, and 11 pages of appendices.
This question was answered quite well and the logic is very coherent. From staying up all night yesterday until now, I have tried my best to pile up the workload on this question. For the first question, I divided the four indicators of infants into two categories: classification and quantitative, and did difference analysis and correlation analysis respectively. In fact, they are all for Look at the p-value. The second question is brainless random forest classification. After the weights are given, I changed a lot of models and parameters for the accuracy of the test set, and finally passed. The third question is to give the treatment plan and then classify and predict according to the second question to see if it can achieve moderate quietness. After determining the treatment method, just keep trying the plan and predict without thinking. The fourth question is first to calculate the score and binning by RSR, and then it is the random forest regression, and the actual prediction of the score is enough. The last question is based on the regression model of the fourth question and has been trying various schemes to see if they can achieve optimal scores.
The reason why it is so long is that
a lot of my paper needs to be used to explain why I do what I do. Basically, I teach you how to do it step by step, and I also need to take care of everyone's level, so there will be some places that need to be written very carefully. It is cumbersome, some intermediate processes are shown in detail, and there are many forms, you can put them in the appendix yourself

I really have limited energy and don’t have the energy to type too many words to explain in text. It may not be detailed enough. You can watch my video explanation:

2023 Huashu Cup Mathematical Modeling C Question: Mother’s Effect on Baby Hands-on Nanny-Level Teaching! _哔哩哔哩_bilibili

This article is very long, so if you can read it in one go, don’t forget to like and save it to avoid getting lost.

OK, here is mine

Table of contents:

Summary:

Question one:

1. Many studies have shown that the mother’s physical and psychological indicators have an impact on the baby’s behavioral characteristics and sleep quality. I would like to ask if there is such a pattern and conduct research on this based on the data in the attachment.

I divide infant indicators into two categories, one is categorical and the other is quantitative. Difference analysis and quantitative correlation analysis are done for classification, but in the end, they all essentially look at the significance of the p value. If there is a significant difference, then it means there is an impact.

Question two:

2. The Infant Behavior Questionnaire is a scale used to assess infant behavioral characteristics. It contains questions about infant emotions and reactions. We divide infants' behavioral characteristics into three types: quiet, medium, and contradictory. Please establish a model of the relationship between the baby's behavioral characteristics and the mother's physical and psychological indicators. The behavioral characteristic information of the last 20 groups (numbered 391-410) of babies in the data table has been deleted. Please judge what type they belong to.

Just make a machine learning model for classification prediction:

Question three:

3. Intervention on maternal anxiety can help improve the mother's mental health, improve the quality of mother-infant interaction, and promote the baby's cognitive, emotional and social development. The change rate of the treatment costs of CBTS, EPDS, and HADS relative to the degree of disease is directly proportional to the treatment costs. After research, the treatment costs corresponding to the two scores are given, see Table 1 for details. There is an infant with ambivalent behavior, number 238. Please build a model to analyze how much treatment is required to change the baby's behavioral characteristics from contradictory to medium? How does the treatment plan need to be adjusted to change his behavioral characteristics to a quiet type?

Give various treatment options and follow the classification prediction model in question 2 to see when it can drop to medium and quiet.

As for how to calculate the cost of treatment and how to define treatment, you can watch the video explanation at the end of the article, so I won’t go into details.

Question 4:

4. Infant sleep quality indicators include sleep time throughout the night, number of wake-ups, and falling asleep methods. Please make a comprehensive evaluation of the baby's sleep quality into four categories: excellent, good, medium and poor, and establish a correlation model between the baby's comprehensive sleep quality and the mother's physical and psychological indicators to predict the last 20 groups of babies (No. 391-410). overall sleep quality.

First make a comprehensive evaluation to calculate the score and classify the grades, and then make a machine learning model to predict the score:

Let’s put in a little more code. Note that it’s just the template code for the random forest, not what I actually used to solve the problem:

function  [tree,discrete_dim] = train_C4_5(S, inc_node, Nu, discrete_dim)  
      
    % Classify using Quinlan's C4.5 algorithm  
    % Inputs:  
    %   training_patterns   - Train patterns 训练样本  每一列代表一个样本 每一行代表一个特征
    %   training_targets    - Train targets  1×训练样本个数 每个训练样本对应的判别值
    %   test_patterns       - Test  patterns 测试样本,每一列代表一个样本  
    %   inc_node            - Percentage of incorrectly assigned samples at a node  一个节点上未正确分配的样本的百分比
    %   inc_node为防止过拟合,表示样本数小于一定阈值结束递归,可设置为5-10
    %   注意inc_node设置太大的话会导致分类准确率下降,太小的话可能会导致过拟合  
    %  Nu is to determine whether the variable is discrete or continuous (the value is always set to 10)  
    %  Nu用于确定变量是离散还是连续(该值始终设置为10)
    %  这里用10作为一个阈值,如果某个特征的无重复的特征值的数目比这个阈值还小,就认为这个特征是离散的
    % Outputs  
    %   test_targets        - Predicted targets 1×测试样本个数 得到每个测试样本对应的判别值
    %   也就是输出所有测试样本最终的判别情况
      
    %NOTE: In this implementation it is assumed that a pattern vector with fewer than 10 unique values (the parameter Nu)  
    %is discrete, and will be treated as such. Other vectors will be treated as continuous  
    % 在该实现中,假设具有少于10个无重复值的特征向量(参数Nu)是离散的。 其他向量将被视为连续的
    train_patterns = S(:,1:end-1)';      
    train_targets = S(:,end)';   
    [Ni, M]     = size(train_patterns); %M是训练样本数,Ni是训练样本维数,即是特征数目
    inc_node    = inc_node*M/100;  % 5*训练样本数目/100
    if isempty(discrete_dim)  
        %Find which of the input patterns are discrete, and discretisize the corresponding dimension on the test patterns  
        %查找哪些输入模式(特征)是离散的,并离散测试模式上的相应维
        discrete_dim = zeros(1,Ni); %用于记录每一个特征是否是离散特征,初始化都记为0,代表都是连续特征,
        %如果后面更改,则意味着是离散特征,这个值会更改为这个离散特征的无重复特征值的数目 
        for i = 1:Ni  %遍历每个特征
            Ub = unique(train_patterns(i,:));  %取每个特征的不重复的特征值构成的向量 
            Nb = length(Ub);    %得到无重复的特征值的数目
            if (Nb <= Nu)  %如果这个特征的无重复的特征值的数目比这个阈值还小,就认为这个特征是离散的  
                %This is a discrete pattern  
                discrete_dim(i) = Nb; %得到训练样本中,这个特征的无重复的特征值的数目 存放在discrete_dim(i)中,i表示第i个特征

Fifth question:

5. Based on question 3, if the sleep quality of baby No. 238 needs to be rated as excellent, does the treatment strategy for question 3 need to be adjusted? How to adjust?

Just change various treatment options and calculate the score to judge the grading:

OK, the above is just a relatively brief graphic version of the explanation. For the video version of the explanation and the complete finished product, you can click on my personal card below to view it↓:

Guess you like

Origin blog.csdn.net/smppbzyc/article/details/132117777