【多标签文本分类】Ensemble Application of Convolutional and Recurrent Neural Networks for Multi-label Text

简介: 【多标签文本分类】Ensemble Application of Convolutional and Recurrent Neural Networks for Multi-label Text

·阅读摘要:

 本文提出基于Seq2Seq模型,提出CNN-RNN模型应用于多标签文本分类。论文表示CNN-RNN模型在大型数据集上表现的效果很好,在小数据集效果不好。

·参考文献:

 [1] Ensemble Application of Convolutional and Recurrent Neural Networks for Multi-label Text Categorization

 [2] Seq2Seq模型讲解,参考博客:【多标签文本分类】代码详解Seq2Seq模型

  本文的收获有三:

  1、CNN-RNN模型;

  2、多标签数据集Reuters-21578;

  3、多标签评价指标:one-error 、hamming loss、Precision、Recall、F1

[1] CNN-RNN模型图


  如下图:模型很简单,左边是一个TextCNN模型,右边是一个解码器Decoder。

【注一】:在理解Seq2Seq的基础上,CNN-RNN模型很好理解。

image.png

[2] 多标签数据集Reuters-21578


  多标签数据集比较难得,获取数据集Reuters-21578,可以使用如下代码:

import nltk
import pandas as pd
nltk.download('reuters')
nltk.download('punkt')
# Extract fileids from the reuters corpus
fileids = reuters.fileids()
# Initialize empty lists to store categories and raw text
categories = []
text = []
# Loop through each file id and collect each files categories and raw text
for file in fileids:
    categories.append(reuters.categories(file))
    text.append(reuters.raw(file))
# Combine lists into pandas dataframe. reutersDf is the final dataframe. 
reutersDf = pd.DataFrame({'ids':fileids, 'categories':categories, 'text':text})

[3] 多标签文本分类评价指标


  one-error:统计top1的预测标签不在实际标签中的实例的比例;

  hamming loss:计算预测标签和相关标签的对称差异,并计算其差异在标签空间中的分数;

image.png

相关文章
|
6月前
|
机器学习/深度学习 数据挖掘 API
[FastText in Text Classification]论文实现:Bag of Tricks for Efficient Text Classification
[FastText in Text Classification]论文实现:Bag of Tricks for Efficient Text Classification
37 2
|
机器学习/深度学习 编解码 人工智能
Text to image综述阅读(2)A Survey and Taxonomy of Adversarial Neural Networks for Text-to-Image Synthesis
这是一篇用GAN做文本生成图像(Text to Image)的综述阅读报告。 综述名为:《A Survey and Taxonomy of Adversarial Neural Networks for Text-to-Image Synthesis》,发表于2019年,其将文本生成图像分类为Semantic Enhancement GANs, Resolution Enhancement GANs, Diversity Enhancement GANs, Motion Enhancement GANs四类,并且介绍了代表性model。
Text to image综述阅读(2)A Survey and Taxonomy of Adversarial Neural Networks for Text-to-Image Synthesis
|
机器学习/深度学习 数据挖掘
【论文解读】Co-attention network with label embedding for text classification
华南理工出了一篇有意思的文章,将标签和文本进行深度融合,最终形成带标签信息的文本表示和带文本信息的标签表示。
232 1
|
机器学习/深度学习 编解码 自然语言处理
DeIT:Training data-efficient image transformers & distillation through attention论文解读
最近,基于注意力的神经网络被证明可以解决图像理解任务,如图像分类。这些高性能的vision transformer使用大量的计算资源来预训练了数亿张图像,从而限制了它们的应用。
521 0
|
数据可视化 数据挖掘
【论文解读】Dual Contrastive Learning:Text Classification via Label-Aware Data Augmentation
北航出了一篇比较有意思的文章,使用标签感知的数据增强方式,将对比学习放置在有监督的环境中 ,下游任务为多类文本分类,在低资源环境中进行实验取得了不错的效果
399 0
|
数据挖掘
【多标签文本分类】Initializing neural networks for hierarchical multi-label text classification
【多标签文本分类】Initializing neural networks for hierarchical multi-label text classification
114 0
【多标签文本分类】Initializing neural networks for hierarchical multi-label text classification
|
机器学习/深度学习 算法 数据挖掘
【多标签文本分类】Deep Learning for Extreme Multi-label Text Classification
【多标签文本分类】Deep Learning for Extreme Multi-label Text Classification
331 0
【多标签文本分类】Deep Learning for Extreme Multi-label Text Classification
|
机器学习/深度学习 算法 数据挖掘
【多标签文本分类】Improved Neural Network-based Multi-label Classification with Better Initialization ……
【多标签文本分类】Improved Neural Network-based Multi-label Classification with Better Initialization ……
125 0
【多标签文本分类】Improved Neural Network-based Multi-label Classification with Better Initialization ……
|
机器学习/深度学习 数据挖掘
【文本分类】ACT: an Attentive Convolutional Transformer for Efficient Text Classification
【文本分类】ACT: an Attentive Convolutional Transformer for Efficient Text Classification
193 0
【文本分类】ACT: an Attentive Convolutional Transformer for Efficient Text Classification
|
机器学习/深度学习 自然语言处理 数据挖掘
【文本分类】A C-LSTM Neural Network for Text Classification
【文本分类】A C-LSTM Neural Network for Text Classification
146 0
【文本分类】A C-LSTM Neural Network for Text Classification