2017年亚太杯APMCM数学建模大赛A题睡眠对人体的影响求解全过程文档及程序

2017年亚太杯APMCM数学建模大赛

A题 睡眠对人体的影响

原题再现

自2001年以来,世界睡眠医学协会将每年的3月21日定为世界睡眠日,以引起人们对睡眠的重要性和质量的关注。

一整天的精神状态取决于昨晚的睡眠质量,高睡眠质量自然保证了人们精力充沛。但据统计,中国成年人失眠率高达38.2%,青少年失眠率也在上升。一般来说,如果入睡时间超过30分钟,就属于失眠的范畴,所以我们相信许多参与者也是失眠者。长期失眠会使人感到疲劳,一整天精力不足,注意力无法集中,因此工作和学习效率也较低。严重失眠甚至会引起自主神经功能紊乱,导致身体各系统失衡和各种问题。

影响失眠的因素很多,一般可分为客观因素和主观因素。客观因素是环境变化、睡前喝茶或喝咖啡等,主观因素一般是生活压力、情绪失落、精神兴奋等精神因素。然而,处于生长发育期的年轻人的大脑极易因学习和工作压力而疲劳。因此,他们必须特别注意卧床休息,以确保身体健康。

人体睡眠质量和可能影响睡眠质量的各种指标数据见附件一。(来源和测试编号不是指标)

附件二给出了睡眠状况的相关分数("0"表示良好,"1"表示正常,"2"表示较差,"3"表示极差),分数越高,睡眠状况越差。

(1) 根据附件一中的数据分析给定的指标与睡眠质量之间的关系,如果一个或多个指标与睡眠品质之间没有相关性,则找出并删除。

(2) 分析诊断结果与睡眠之间的关系。

(3) 假设你是一名医生,根据附件三中的数据,你会对患者做出什么诊断?给出您的诊断结果。

(4) 为了身体的健康,如何科学地安排我们的休息时间?制定适当的睡眠计划并评估其有效性。

整体求解过程概述(摘要)

据统计,中国人的失眠率正在上升。如果人们不注意休息,长期失眠会导致各种疾病的发生。因此,为了保持身心健康,需要一个合理的睡眠计划。
  为了解决问题1,首先,本文分析了附件一中的数据,排除了异常数据。然后,根据新数据确定指标与睡眠质量之间的相关性,使用SPSS分析每个属性的Pearson相关系数,从而消除了一个名为Reliability的无关属性。同时,附件一中的诊断结果根据性别和年龄分为六组,这六组数据中排除了与睡眠质量无关的指标。最后,利用统计分类模型得到了睡眠质量与给定指标之间的多元回归关系。
  对于问题2,本文首先分析了附件二表格中的数据,排除了异常值。然后,根据国际分类标准,本文试图用定性分析的方法对诊断类型进行降维分类。接下来,对数据进行定量分析,发现男女比例接近1:2。以建立迭代模型为基础,依据机器学习的深度原理,建立诊断评价矩阵。不断向下迭代低维数据,直到迭代精度达到模型的最优解,然后立即停止迭代,以获得最优解。最后,最终迭代判断的正确性达到72.1%,这意味着疾病变量和睡眠指标具有更高的匹配度。
  针对问题3,将附件三中的数据引入问题2的模型中,采用MATLAB算法进行深度机器学习。
  第二,使用附件二中的干净数据作为样本集,并将附件三集发送到样本集中进行训练,将获得评估指标。在对最终的评价标准进行排序和筛选得到最优解后,根据最优解,找到相应的疾病。最终,有一半的人患有抑郁症。
  针对问题4,本文利用MATLAB进行随机仿真。根据Hadoop的结果规划健康的睡眠时间表,随着迭代次数的增加,Hadoop更有效,并发现影响人们睡眠的指标大多恢复到正常值。

模型假设:

为了简化问题并方便我们模拟现实生活中的条件,
  我们做了以下基本假设,每一个都是合理的。
   假设标题中的数据适合所有人。
   假设医生是专业的,但也有判断错误
   假设数据源是真实可靠的。

问题重述:

背景
  进入21世纪以来,人们的健康意识空前提高,"拥有健康才能拥有一切"的新理念深入人心。因此,睡眠问题引起了国际社会的关注。根据世界卫生组织对14个国家和15个地区的25916名初级保健患者的调查,发现27%的人有睡眠问题。据报道,美国失眠的发病率高达32至50%,英国为10~14%,日本为20%,法国为30%,中国超过30%。50%的学生睡眠不足。

睡眠障碍对生活质量有负面影响,但相当多的患者没有得到正确的诊断和治疗。睡眠障碍已经成为威胁全世界公众的一个突出问题。

影响失眠的许多因素通常可分为两大类,即客观因素和主观因素。客观因素有环境变化、睡前喝茶或喝咖啡等。;而主观因素一般是生活压力、情绪损失、精神兴奋等心理因素。然而,在他们的成长和发展过程中,年轻人很容易因为学习和工作的压力而感到疲惫。因此,他们必须特别注意卧床休息,以确保身体健康。

问题重述

为了研究睡眠对人体的影响,根据附件一和附件二中的数据解决了以下问题:

 根据附件一中的数据,分析给定指标与睡眠质量之间的关系。如果一个或多个指标与睡眠质量之间没有相关性,请识别并排除它们。

 分析诊断与睡眠之间的关系。

 根据附件三中的数据,对患者进行了诊断并给出了结果。

 如何安排休息以保持良好的健康?制定睡眠计划并评估其有效性。

文献综述

为了测量睡眠质量,匹兹堡大学精神病学家Buysse博士和其他人于1989年编制了匹兹堡睡眠质量指数(PSQI)。该量表适用于睡眠障碍、精神障碍患者,也适用于一般睡眠质量的评估。

基于匹兹堡睡眠质量量表,严有为和林荣茂通过收集问卷和构建结构方程模型,进一步研究了焦虑与睡眠质量的关系及其潜在机制。结果表明,焦虑敏感学生的PSQI得分明显高于低焦虑敏感学生。焦虑敏感度越高,睡眠质量就越差。

正是因为睡眠问题在所有年龄段都会出现。因此,研究老年人的睡眠也是必要的。对此,赵培秋通过对65例老年患者的临床观察护理,分析了老年人失眠的原因,包括生理因素、心理因素、环境因素、药物因素、饮食因素五个方面。

进一步的研究是基于模型与现实的比较。刘贤臣、唐茂琴提出以神经症患者为测试对象,采用统计学分析技术对匹兹堡睡眠质量指数进行信度和有效性测试。

模型的建立与求解整体论文缩略图


全部论文及程序请见下方" 只会建模 QQ名片" 点击QQ名片即可

程序代码:

部分程序如下:
bash 复制代码
// Operating environment: EXCEL;
=EXACT($C$2,C16)*EXACT($D$2,D16)*(SQRT(POWER(($B$2-B16),2))+SQRT(POWE
R(($E$2-F16),2))+SQRT(POWER(($F$2-G16),2))+SQRT(POWER(($G$2-H16),2))+SQRT(
POWER(($H$2-I16),2))+SQRT(POWER(($I$2-J16),2))+SQRT(POWER(($J$2-K16),2))+SQ
RT(POWER(($K$2-L16),2)))
%% AUTHOR: Contestants of APMCM;
%% FUNCTION: A program used for data processing on MATLAB;
%% TIME: 25th,Nov ember,2017.
%% Initialization;
clear
clc
%% Basic parameters configuration;
upperlimit=5665; % The number of rows to process.
diagnosis_less_limit=100; % Lowest limit of classification.
filename='data_clear.xlsx'; % The original data stored in this file.
sheet='原始数据'; % The name of the sheet in the EXCEL.
%% Loading the original data;
% number_init=xlsread(filename,sheet,'A2:A6350');
% age_init=xlsread(filename,sheet,'B2:B6350');
% [temp1,temp2,sex_init]=xlsread(filename,sheet,'C2:C6350');
% [temp3,source_init,temp4]=xlsread(filename,sheet,'D2:D6350');
[temp5,diagnosis_init,temp6]=xlsread(filename,sheet,'E2:E6350');
% sleep_quality_init=xlsread(filename,sheet,'F2:F6350');
% sleep_latency_init=xlsread(filename,sheet,'G2:G6350');
% sleep_time_init=xlsread(filename,sheet,'H2:H6350');
% sleep_efficiency_init=xlsread(filename,sheet,'I2:I6350');
% sleep_disorder_init=xlsread(filename,sheet,'J2:J6350');
% hypnagogue_init=xlsread(filename,sheet,'diagnosis_species 2:diagnosis_species 6350');
% daytime_dyfunction_init=xlsread(filename,sheet,'L2:L6350');
clear temp* sheet filename % Free up memory space.
%% Convert sexual attributes to Boolean distribution;
% for i=1:upperlimit-1
% if(length(sex_init{i}) == 4) 
% sex(i,1)=1;
% else
% sex(i,1)=0;
% end
% end
%% Number the illness types
diagnosis_names=cell(upperlimit-1,1);
i=1;diagnosis_species =1;flag=0;
for m=1:upperlimit-1
 for i=1:diagnosis_species 
 temp=strcmp(diagnosis_names{i},diagnosis_init{m}); % The same is returned 
1, defference is returned 0;
 if(temp)
 else
 flag=flag+1;
 end
 end
 if(flag==diagnosis_species )
 diagnosis_names{diagnosis_species } = diagnosis_init{m};
diagnosis_species =diagnosis_species +1;
 end
 flag=0;
end
diagnosis_species=diagnosis_species-1;
clear i m temp flag
%% Calculate the number of each condition;
temp=0;flag=0;m=0;
for i=1:diagnosis_species 
 for m=1:upperlimit-1
 temp=strcmp(diagnosis_names{i},diagnosis_init{m});
 if(temp == 1) 
 flag=flag+1;
 end
 end
 diagnosis_number(i,1)=flag;
 flag=0;
end
clear temp i flag m 
%% The explanation format of the conversion disorder is a character;
%% Find out the rare ones and find the quantity;
for i=1:diagnosis_species
 if(diagnosis_number(i,1) <= diagnosis_less_limit)
 boolean_evaluation(i,1)=1;
 else
 boolean_evaluation(i,1)=0;
 end
end
clear i
other_diagnosis_species=sum(boolean_evaluation);
other_diagnosis_number=sum(boolean_evaluation.*diagnosis_number);
%% call any required information;
% for i=1:diagnosis_species
% if(temp(i,1)==1)
% number_less(i,1)=number_init(i,1);
% age_less(i,1)=age_init(i,1);
% sex_less(i,1)=sex_(i,1);
% source_less{i}=source_init{i};
% diagnosis_less{i}=diagnosis_init{i};
% sleep_quality_less(i,1)=sleep_quality_init(i,1);
% sleep_latency_less(i,1)=sleep_latency_init(i,1);
% sleep_time_less(i,1)=sleep_time_init(i,1);
% sleep_efficiency_less(i,1)=sleep_efficiency_init(i,1);
% sleep_disorder_less(i,1)=sleep_disorder_init(i,1);
% hypnagogue_less(i,1)=hypnagogue_init(i,1);
% daytime_dyfunction_less(i,1)=daytime_dyfunction_init(i,1);
% end
% end
% clear temp
%% Classify and make pie charts by number;
% Processing data;
k=1;
data=(~boolean_evaluation).*diagnosis_number; % Input data
final_classification_species=sum(~boolean_evaluation)+1;
for i=1:diagnosis_species
if(data(i) == 0)
 else
 data_useful(k,1)=diagnosis_number(i,1);
 k=k+1;
 end
end
final_classification_numbers=[data_useful;other_diagnosis_number];
%% Make sure the names of classification;
k=1;
for i=1:diagnosis_species
 if(boolean_evaluation(i) == 0)
 final_classification_names{k}=diagnosis_names{i};
 k=k+1;
 end
end
final_classification_names{final_classification_species}='Other Diagnosises';
clear i k data data_useful
label=final_classification_names; % Enter the label;
data=final_classification_numbers'; % Define the salient parts;
for i=1:final_classification_species
 
if(final_classification_numbers(i,1)>(sum(final_classification_numbers)/final_classification_s
pecies))
 explode(i,1)=1;
 else
 explode(i,1)=0;
 end
end
explode=explode';
bili=data/sum(data); % Calculate the ratio;
baifenbi=num2str(bili'*100,'%1.2f');% Calculate the percentage;
baifenbi=[repmat(blanks(2),length(data),1),baifenbi,repmat('%',length(data),1)];
baifenbi=cellstr(baifenbi);
Label=strcat(label,baifenbi');
%% Drawing;
pie(data,explode,Label)
clear i label Label explode data bili baifenbi data_useful
%% Output analysis result.
disp('According to the data you provided, the final result of the output analyzed by the 
mathematical modelis:')
disp('Each categorie of disorders is:')
final_classification_species'
disp('Each names of the categories is:')
final_classification_names
disp('Each number of patients with disease is')
final_classification_numbers'
disp('The resulting of pie chart is shown in the window.')
%% AUTHOR: Contestants of APMCM;
%% FUNCTION: A program used for data processing on MATLAB;
%% TIME: 25th,Nov ember,2017.
clc,clear, close all;
data=load('shuju.txt'); %Enter the text document shuju.txt in the workspace named data form
plot(data(:,1),'r')
ylabel('Reliability');
legend('Reliability');
figure;
plot(data(:,2))
ylabel('Psychoticism');
legend('Psychoticism');
figure;
plot(data(:,3),'k')
ylabel('Nervousness');
legend('Nervousness');
figure;
plot(data(:,4),'g')
ylabel('Character');
legend('Character');
%% AUTHOR: Contestants of APMCM;
%% FUNCTION: A program used for data processing on MATLAB;
%% TIME: 25th,Nov ember,2017.
x1=data(:,1);
x2=data(:,2);
x3=data(:,3);
x4=data(:,4);
x5=data(:,5);
x6=data(:,6);
x7=data(:,7);
y=data1(:,1);
x=[x1 x2 x3 x4 x5 x6 x7];
stepwise(x,y)
%% AUTHOR: Contestants of APMCM;
%% FUNCTION: A program used for data processing on MATLAB;
%% TIME: 25th,Nov ember,2017.
x1=data(:,1);
x2=data(:,2);
x3=data(:,3);
x4=data(:,4);
x5=data(:,5);
x6=data(:,6);
x7=data(:,7);
y=data1(:,1);
x=[x1 x2 x3 x4 x5 x6 x7];
X=[ones(1623,1) x1 x2 x3 x4 x5 x6 x7];
 b=regress(y,X)
%% AUTHOR: Contestants of APMCM;
%% FUNCTION: A program used for data processing on MATLAB;
%% TIME: 25th,Nov ember,2017.
clc,clear, close all;
data=load('yuchuli.txt'); %Enter the text document shuju.txt in the workspace named data 
form
plot(data(:,1),'r')
ylabel('Reliability');
legend('Reliability');
figure;
plot(data(:,2))
ylabel('Psychoticism');
legend('Psychoticism');
figure;
plot(data(:,3),'k')
ylabel('Nervousness');
legend('Nervousness');
figure;
plot(data(:,4),'g')
ylabel('Character');
legend('Character');
全部论文及程序请见下方" 只会建模 QQ名片" 点击QQ名片即可
相关推荐
李昊哲小课38 分钟前
pandas销售数据分析
人工智能·python·数据挖掘·数据分析·pandas
Leo.yuan2 小时前
数据分析师如何构建自己的底层逻辑?
大数据·数据仓库·人工智能·数据挖掘·数据分析
Better Rose4 小时前
【2025 年第十五届 APMCM数学建模竞赛】B题 问题一、二模型建立与求解
数学建模
zhangfeng11335 小时前
python 数据分析 单细胞测序数据分析 相关的图表,常见于肿瘤免疫微环境、细胞亚群功能研究 ,各图表类型及逻辑关系如下
开发语言·python·数据分析·医学
UI罐头5 小时前
如何选择数据可视化工具?从设计效率到图表表现力全解读
信息可视化·数据分析·数据工具
java1234_小锋1 天前
基于Python的旅游推荐协同过滤算法系统(去哪儿网数据分析及可视化(Django+echarts))
python·数据分析·旅游
视频砖家1 天前
观众信息设置与统计(视频高级分析与统计功能)
数据分析·视频观看分析·视频数据分析
SelectDB1 天前
Apache Doris 实时更新技术揭秘:为何在 OLAP 领域表现卓越?
数据库·数据分析·apache
聚客AI1 天前
搜索引擎vs向量数据库:LangChain混合检索架构实战解析
人工智能·pytorch·语言模型·自然语言处理·数据分析·gpt-3·文心一言