当前位置:   article > 正文

matlab 对数据进行分类,使用深度学习对文本数据进行分类

用matlab对数据进行分类

导入数据

导入工厂报告数据。该数据包含已标注的工厂事件文本描述。要将文本数据作为字符串导入,请将文本类型指定为 'string'。

filename = "factoryReports.csv";

data = readtable(filename,'TextType','string');

head(data)

ans=8×5 table

Description Category Urgency Resolution Cost

_____________________________________________________________________ ____________________ ________ ____________________ _____

"Items are occasionally getting stuck in the scanner spools." "Mechanical Failure" "Medium" "Readjust Machine" 45

"Loud rattling and banging sounds are coming from assembler pistons." "Mechanical Failure" "Medium" "Readjust Machine" 35

"There are cuts to the power when starting the plant." "Electronic Failure" "High" "Full Replacement" 16200

"Fried capacitors in the assembler." "Electronic Failure" "High" "Replace Components" 352

"Mixer tripped the fuses." "Electronic Failure" "Low" "Add to Watch List" 55

"Burst pipe in the constructing agent is spraying coolant." "Leak" "High" "Replace Components" 371

"A fuse is blown in the mixer." "Electronic Failure" "Low" "Replace Components" 441

"Things continue to tumble off of the belt." "Mechanical Failure" "Low" "Readjust Machine" 38

此示例的目标是按 Category 列中的标签对事件进行分类。要将数据划分到各个类,请将这些标签转换为分类。

data.Category = categorical(data

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/神奇cpp/article/detail/774954
推荐阅读
相关标签
  

闽ICP备14008679号