登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 计算机类 > 计算机科学与技术 > 正文

基于机器学习的Stack Overflow问答平台自动标记的设计与实现毕业论文

 2022-01-12 09:01  

论文总字数:31153字

摘 要

Stack Overflow网站专用于编程问题的问答,每个问题都有自己的标签,以帮助用户了解与其专业领域或兴趣相关的问题。但是,提问的人可能不知道对问题进行标记的最佳方式,并且自动标记问题是一项具有挑战性的任务。所以使用机器学习对提出的问题进行自动标记是可行的。

本文利用R语言和Python语言开发和相关的库函数和分类算法在开发平台R Studio和jupyter notebook上进行数据分析和模型设计。因为R语言可视化库函数的完备性,所以首先在R Studio上对数据集进行分析和相关可视化操作,获取标签的数量、变化、词频等性质和问题单词的频率、数量、相关性等性质。在jupyter notebook上清洗含有HTML标签、链接、代码段的原始数据,使用稀疏矢量器提取特征值,使用Sklearn的8个分类器训练和测试分类模型分析他们的优劣。

通过分类器的准确度、训练数据和测试时间的对比,得出梯度下降分类器准确度最高,被动攻击性分类器训练和测试时间最短。

关键词:文本分类 机器学习 特征提取 分类算法 python

Design and Implementation of Automatic Marking for

Stack Overflow Question and Answer Platform Based on Machine Learning

Abstract

The Stack Overflow website is dedicated to questions and answers about programming questions, each with its own label to help users understand issues related to their area of expertise or interests. However, the person questioning may not know the best way to tag the problem, and auto-tagging the question is a challenging task. Therefore, it is feasible to use machine learning to automatically mark the proposed problem.

This paper uses R and Python development and related library functions and classification algorithms to perform data analysis and model design on the development platform R Studio and jupyter notebook. Because of the completeness of the R language visualization library function, the dataset is first analyzed and related visualized on R Studio, and the nature of the number, variation, word frequency and the nature, number, and relevance of the problem words are obtained. The raw data containing HTML tags, links, and code segments is cleaned on the jupyter notebook, the feature values are extracted using sparse vectorizer, and the advantages and disadvantages of Sklearn's eight classifier training and test classification models are analyzed.

Through the comparison of the accuracy of the classifier, the training data and the test time, the SGD Classifier has the highest accuracy, and the Passive Aggressive Classifier has the shortest training and test time.

Keywords: Text classification; machine learning; feature extraction; classification algorithm; python

目 录

摘要 1

Abstract 2

第一章 绪论 1

1.1 开发背景 1

1.2 研究现状 2

1.2.1 知识工程方法 2

1.2.2 文本自动分类 2

1.2.3 文本分类的当前挑战 3

第二章 开发语言和技术概述 4

2.1 R语言和Python语言简介 4

2.1.1 R语言简介 4

2.1.2 Python语言简介 4

2.2 相关技术简介 5

2.2.1 SciKit learn机器学习简介 5

2.2.2 文本预处理简介 5

2.2.3 特征提取简介 5

2.2.4 分类模型简介 6

第三章 需求分析 9

3.1 问答平台自动标记需求分析 9

3.1.1 问答平台 9

3.1.2 自动标签化 9

3.2 分类模型需求分析 10

第四章 数据分析与模型设计 11

4.1 数据分析 11

4.1.1 标签分析 11

4.1.2 单词分析 15

4.2 模型设计 23

4.2.1 导入和数据清洗 23

4.2.2 标签数量 24

4.2.3 模型准备工作 26

4.2.4 特征提取 28

4.2.5 训练分类模型 29

4.2.6 绘制条形图 34

4.2.7 打印分类报告 36

总结与展望 37

参考文献 38

致谢 40

第一章 绪论

1.1 开发背景

网络时代快速发展,现如今人们无论做什么事情都离不开网络,信息爆炸成为了常态。为了让用户更快的获取自己想要的信息,对标题的分类标签化成为了最常使用的方法。购物网站对商品信息进行分类以便于用户查找和对用户进行推荐;论坛网站对帖子进行分类以便让使用者更容易找到自己喜爱的话题;问答网站更是需要对问题进行分类以便用户找到类似的问题或者找到自己可以回答的问题。

图1-1 各类网站对信息的分类检索

请支付后下载全文,论文总字数:31153字

您需要先支付 80元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图