建设多用户网站,最好的汽车科技网站建设,网页编辑软件绿色,义乌网站建设哪家好2017年第六届数学建模国际赛小美赛
B题 电子邮件中的笔迹分析
原题再现#xff1a; 笔迹分析是一种非常特殊的调查形式#xff0c;用于将人们与书面证据联系起来。在法庭或刑事调查中#xff0c;通常要求笔迹鉴定人确认笔迹样本是否来自特定的人。由于许多语言证据出现在电…2017年第六届数学建模国际赛小美赛
B题 电子邮件中的笔迹分析
原题再现 笔迹分析是一种非常特殊的调查形式用于将人们与书面证据联系起来。在法庭或刑事调查中通常要求笔迹鉴定人确认笔迹样本是否来自特定的人。由于许多语言证据出现在电子邮件中从广义上讲笔迹分析还包括如何根据电子邮件的语言特征识别作者的问题。 作者归属是语言学家开始使用语言风格的可识别特征从词频到首选句法结构来识别有争议文本的作者的过程。电子邮件内容短小作者语言风格明显。请构造一个有效的模型通过捕获电子邮件的语言特征来识别作者。您可以使用安然电子邮件数据集来培训和测试您的模型。 安然电子邮件数据集链接http://bailando.sims.berkeley.edu/enron_email.html
整体求解过程概述(摘要) 本文开发了一个工具可以用来识别这类电子邮件的作者。作者的风格可以通过测量文本中的各种茎秆特征来简化为一种模式。电子邮件还包含可测量的宏结构特征。这些特征可与支持向量机SVM学习算法一起使用以分类或将电子邮件的作者身份归属给作者提供适当的消息样本以供比较。 首先第3章讨论了实验过程的计划和范围该实验过程用于确定分析电子邮件的作者特征和识别电子邮件的作者身份是否可行。概述了需要评估的特征列表并说明了为什么要使用支持向量机SVM算法进行这项工作。特征集包括但不限于基于文档的特征、基于单词的特征、虚词比率、字长频率分布、搭配频率、基于字符的特征和字母2-gram。 接下来第4章详细介绍了为对电子邮件作者进行系统分类而进行的实验并报告了实验结果。这是通过首先进行一系列实验来完成的这些实验旨在揭示纯文本块不是电子邮件的成功SVM作者属性的基线值从而设置特征集、文本大小和消息数量的约束。这些基线实验为该项目的核心——识别电子邮件文本中包含的有用特性的任务——设置了框架。本章报告的实验列表见表12第25页。第38页报告了这些结果证实了迄今使用的方法可作为进一步研究电子邮件数据的基础。 最后第5章讨论了电子邮件的属性和分析。第5.1节讨论了对电子邮件数据进行的初步实验。电子邮件数据用于本章中讨论的实验因此可以首次测试电子邮件特定功能的影响。第5.2节概述了如何改进结果。第5.3节确定了电子邮件中讨论主题的影响。本研究的目的是使用加权的宏平均F1度量在大约85%的水平上实现电子邮件数据的正确分类。本章报告的结果表明在增加了电子邮件的结构特征之后这一目标就实现了。本章报告的实验列表见表22第39页。 最后一章对本文的主要结论进行了总结。这也为今后的工作提出了一些可能的扩展。
模型假设 •我们已经考虑的因素发挥着至关重要的作用。 •我们收集的数据是准确的。 •人们的写作习惯没有改变。
问题分析 问题背景: 许多公司和机构已经开始依赖因特网来处理业务随着个人使用因特网特别是自万维网建立以来电子邮件流量显著增加。Lyman和Varian2000年估计2000年将发送5 000亿至6 000亿封电子邮件进一步估计到2003年每年发送的电子邮件将超过2万亿封。在GVU’s1第8次WWW用户调查中Pitkow等人1997年84%的受访者表示电子邮件是不必要的。 随着电子邮件流量的增加出于不正当的原因电子邮件的使用量也随之增加。误用的例子包括发送垃圾邮件或未经请求的商业电子邮件UCE这是垃圾邮件的广泛传播发送威胁发送恶作剧以及计算机病毒和蠕虫的传播。此外贩运毒品或儿童色情制品等犯罪活动很容易通过发送简单的电子邮件来协助和教唆。 本文讨论的问题包括 •设置使用支持向量机进行分类实验的框架 •选择候选文体特征以解决电子邮件作者分类问题 •确定测试电子邮件作者身份分类是否成功的实验序列
模型的建立与求解整体论文缩略图 全部论文请见下方“ 只会建模 QQ名片” 点击QQ名片即可
部分程序代码(代码和文档not free)
with open(x_C.pickle,rb) as f:x_C pickle.load(f)f.close()
with open(y.pickle,rb) as f:y pickle.load(f)f.close()
with open(x_W.pickle,rb) as f:x_W pickle.load(f)f.close()
with open(x_F.pickle,rb) as f:x_F pickle.load(f)f.close()
with open(x_L.pickle,rb) as f:x_L pickle.load(f)f.close()
with open(x_C_W.pickle,rb) as f:x_C_W pickle.load(f)f.close()
with open(x_C_F.pickle,rb) as f:x_C_F pickle.load(f)f.close()
with open(x_W_F.pickle,rb) as f:x_W_F pickle.load(f)f.close()
with open(x_F_L.pickle,rb) as f:x_F_L pickle.load(f)f.close()
with open(x_F_C_W.pickle,rb) as f:x_F_C_W pickle.load(f)f.close()
with open(x_F_C_L.pickle,rb) as f:x_F_C_L pickle.load(f)f.close()
with open(x_F_L_W.pickle,rb) as f:x_F_L_W pickle.load(f)f.close()
with open(x_F_C_L_W.pickle,rb) as f:x_F_C_L_W pickle.load(f)f.close()
#test diffrent feaure effect (x_C)
x_train, x_test, y_train, y_test train_test_split(x_C, y, test_size0.2,
random_state42)
svclf SVC(kernel linear)#default with rbf
svclf.fit(x_train,y_train)
pred svclf.predict(x_test);
print(x_C accuracy: ,sum(pred y_test)/len(y_test))
#test diffrent feaure effect (x_W)
x_train, x_test, y_train, y_test train_test_split(x_W, y, test_size0.2,
random_state42)
svclf SVC(kernel linear)#default with rbf
svclf.fit(x_train,y_train)
pred svclf.predict(x_test);
print(x_W accuracy: ,sum(pred y_test)/len(y_test))
#test diffrent feaure effect (x_F)
x_train, x_test, y_train, y_test train_test_split(x_F, y, test_size0.2,
random_state42)
svclf SVC(kernel linear)#default with rbf
svclf.fit(x_train,y_train)
pred svclf.predict(x_test);
print(x_F accuracy: ,sum(pred y_test)/len(y_test))
#test diffrent feaure effect (x_L)
x_train, x_test, y_train, y_test train_test_split(x_L, y, test_size0.2,
random_state42)
svclf SVC(kernel linear)#default with rbf
svclf.fit(x_train,y_train)
pred svclf.predict(x_test);
print(x_L accuracy: ,sum(pred y_test)/len(y_test))
#test diffrent feaure effect (x_C_W)
x_train, x_test, y_train, y_test train_test_split(x_C_W, y, test_size0.2,
random_state42)
svclf SVC(kernel linear)#default with rbf
svclf.fit(x_train,y_train)
pred svclf.predict(x_test);
print(x_C_W accuracy: ,sum(pred y_test)/len(y_test))
#test diffrent feaure effect (x_C_F)
x_train, x_test, y_train, y_test train_test_split(x_C_F, y, test_size0.2,
random_state42)
svclf SVC(kernel linear)#default with rbf
svclf.fit(x_train,y_train)
pred svclf.predict(x_test);
print(x_C_F accuracy: ,sum(pred y_test)/len(y_test))
#test diffrent feaure effect (x_W_F)
x_train, x_test, y_train, y_test train_test_split(x_W_F, y, test_size0.2,
random_state42)
svclf SVC(kernel linear)#default with rbf
svclf.fit(x_train,y_train)
pred svclf.predict(x_test);
print(x_W_F accuracy: ,sum(pred y_test)/len(y_test))
#test diffrent feaure effect (x_F_L)
x_train, x_test, y_train, y_test train_test_split(x_F_L, y, test_size0.2,
random_state42)
svclf SVC(kernel linear)#default with rbf
svclf.fit(x_train,y_train)
pred svclf.predict(x_test);
print(x_F_L accuracy: ,sum(pred y_test)/len(y_test))
#test diffrent feaure effect (x_F_C_W)
x_train, x_test, y_train, y_test train_test_split(x_F_C_W, y, test_size0.2,
random_state42)
svclf SVC(kernel linear)#default with rbf
svclf.fit(x_train,y_train)
pred svclf.predict(x_test);
print(x_F_C_W accuracy: ,sum(pred y_test)/len(y_test))
#test diffrent feaure effect (x_F_C_L)
x_train, x_test, y_train, y_test train_test_split(x_F_C_L, y, test_size0.2,
random_state42)
svclf SVC(kernel linear)#default with rbf
svclf.fit(x_train,y_train)
pred svclf.predict(x_test);
print(x_F_C_L accuracy: ,sum(pred y_test)/len(y_test))
#test diffrent feaure effect (x_F_L_W)
x_train, x_test, y_train, y_test train_test_split(x_F_L_W, y, test_size0.2,
random_state42)
svclf SVC(kernel linear)#default with rbf
svclf.fit(x_train,y_train)
pred svclf.predict(x_test);
print(x_F_L_W accuracy: ,sum(pred y_test)/len(y_test))
#test diffrent feaure effect (x_F_C_L_W)
x_train, x_test, y_train, y_test train_test_split(x_F_C_L_W, y, test_size0.2,
random_state42)
svclf SVC(kernel linear)#default with rbf
svclf.fit(x_train,y_train)
pred svclf.predict(x_test);
print(x_F_C_L_W accuracy: ,sum(pred y_test)/len(y_test))
#test diffrent kernel effect
new_kernel [Linear,Polynomial,Radial basis function,Sigmoid tanh]
x_train, x_test, y_train, y_test train_test_split(x_F_C_L_W, y, test_size0.2,
random_state42)
for kernel in new_kernel:svclf SVC(kernelkernel)svclf.fit(x_train, y_train)pred svclf.predict(x_test);print(kernel, accuracy: , sum(pred y_test)/len(y_test))
#test diffrent gama effect
gama_lst [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1.0, 2.0]
x_train, x_test, y_train, y_test train_test_split(x_F_C_L_W, y, test_size0.2,
random_state42)
for gama in gama_lst:svclf SVC(kernel linear,gammagama)svclf.fit(x_train, y_train)pred svclf.predict(x_test);print(gama,gama, accuracy: , sum(pred y_test)/len(y_test))
#test diffrent degree effect
x_train, x_test, y_train, y_test train_test_split(x_F_C_L_W, y, test_size0.2,
random_state42)
for degree in range(1,11):svclf SVC(kernel linear,degreedegree)svclf.fit(x_train, y_train)pred svclf.predict(x_test);print(gama,degree, accuracy: , sum(pred y_test)/len(y_test))全部论文请见下方“ 只会建模 QQ名片” 点击QQ名片即可