基于Python与MATLAB混合编程的文本分类应用案例设计  被引量:3

Design of Text Classification Application Case Based on Python and MATLAB Mixed Programming

在线阅读下载全文

作  者:刘卫国[1] 陈斌[2] LIU Wei-guo;CHEN Bin(School of Computer Science and Engineering,Central South University;School of Automation,Central South University,Changsha 410083,China)

机构地区:[1]中南大学计算机学院 [2]中南大学自动化学院,湖南长沙410083

出  处:《软件导刊》2021年第7期71-75,共5页Software Guide

基  金:中南大学教育教学改革研究项目(2020jy040)。

摘  要:案例教学是重要的教学方法。利用朴素贝叶斯分类算法,以单词出现频率作为特征对文本进行分类。定义MATLAB函数以实现朴素贝叶斯分类器训练与文本分类功能,然后在Python程序中通过MATLAB引擎调用MATLAB函数。与Python调用NumPy第三方库的实现方法进行对比,发现使用混合编程实现文本分类器的错误率为4.5%,比单独使用Python实现的错误率降低了1.5%,但混合编程的程序执行效率不如单独使用Python的方法。将该文本分类应用案例用于Python或MATLAB课程教学,可更好地引导学生选择恰当的实现方法,培养学生的计算机应用能力。Case teaching is an important teaching method.The Naive Bayes classification algorithm is used to classify the text,and the frequency of word occurrence is used as the text feature.MATLAB function is defined to realize the training of Naive Bayes classifier and text classification function,and then MATLAB function is called in Python program by MATLAB engine.Compared the approach of mixed programming with the implementation method of calling NumPy third-party library in Python,the result shows that the error rate of mixed programming for text classifier is 4.5%,which is 1.5% lower than that of using Python alone,but the program execution efficiency of mixed programming is not as good as that of using Python alone.Applying the text classification application case to Python or MATLAB course teaching can better guide students to choose the appropriate implementation method and cultivate their computer application ability.

关 键 词:混合编程 文本分类 应用案例 朴素贝叶斯算法 

分 类 号:TP302[自动化与计算机技术—计算机系统结构]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象