python中的多标签分类 [英] multi-label classification in python

查看:107
本文介绍了python中的多标签分类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始使用 Pybrain,它是很好的神经网络算法.如果有人已经熟悉它,该包是否也能够进行多标签分类?多标签与多类分类不同,因为一个实例可以有多个类作为其输出/目标.

解决方案

你的问题有点含糊.

是的

我相信我的理解是正确的,是的 PyBrain 能够完成这样的任务.Pybrain 中的神经网络能够(通过监督学习1)通过对输入值进行多重标记来进行实例分类.

只是一个提示:

由于您正在对输入实例进行逻辑分离,因此我建议使用 sigmoid 逻辑函数,因为您的输入在 [0, 1] 的范围内.如果您的输入范围是实数,则 tanh 已证明平均要快得多2


示例输出

 # 输出被 sigmoid( ) 函数压缩0 1 1 0 # 第一类1 1 1 0 # 一级0 0 1 0 # 第二类0 1 1 1 # 第二类0 0 1 0 # 第三类


<小时>1我没有研究过无监督学习,所以我不敢另外说明.
2请参阅this以获取快速基准.>

I am beginning to use Pybrain which good neural networks algorithms. If anybody is familiar with it already, is the package capable of doing multi-label classification as well? Multi-label is different from multi-class classification because an instance can have more than one class as their output/target.

解决方案

Your question is a bit vague.

Yes

I believe I've understood you correctly, and yes PyBrain is capable of doing such a task. Neural networks in Pybrain are capable (through supervised learning1 ) of doing instance classification through multi-labeling the input values.

Just a tip:

Since you are performing a logical separation of the input instances I recommend using the sigmoid logistic function given that your input are in the range of [0, 1]. If your input range is the Real Numbers, the tanh has proven a lot faster on average2


Example outputs

    # The outputs are sqashed by the sigmoid( ) function

    0 1 1 0 # class one
    1 1 1 0 # class one
    0 0 1 0 # class two
    0 1 1 1 # class two
    0 0 1 0 # class three



1 I've not studied unsupervised learning, so I dare not state otherwise.
2 See this for a quick benchmark.

这篇关于python中的多标签分类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆