Comments (2)
对于如下的数据样本:{"id": "1", "title": ["tokens"], "abstract": ["tokens"], "section": [1, 2], "subsection": [1, 2, 3, 4], "group": [1, 2, 3, 4], "labels": [1, 2, 1+N, 2+N, 3+N, 4+N, 1+N+M, 2+N+M, 3+N+M, 4+N+M]}。其中N和M分别是层级2和层级3的类别数。这里的表述是不是有问题,N应该是层级1的类别数,M是层级2的类别数。
确实是我表述错误,其中 N 应该是层级 1 的类别数,M 是层级 2 的类别数。
另外在
data_helper.py
中,函数load_data_and_labels()
中的_create_onehot_labels()
,其中label[int(item)] = 1
应该改为label[int(item)-1] = 1
才对吧?
这个其实是根据我们处理的数据标签 index,我自己处理的数据标签 index 实际上是从 0 开始的,所以不需要减 1。如果自己数据标签 index 从 1 开始就要进行减 1 操作(可能是我上面的举例让大家以为我的数据标签 index 是从 1 开始的)。无论如何,是否-1
根据自己的数据标签 index 是否从 0 开始编码设置即可。
from hierarchical-multi-label-text-classification.
再次感谢指正。我更改了 README.md
中表述有误的地方,另外用于举例的 sample,其标签 index 显示从 0 开始编码,避免引起类似误会。
from hierarchical-multi-label-text-classification.
Related Issues (20)
- Why softmax is applied in the _local_layer function? HOT 1
- Raw Patent Dataset HOT 2
- why highway is used in producing global prediction? HOT 3
- The relationship between parent and children labels
- 感谢分享,看了paper和code,作者有对比过BERT直接做global分类吗,谢谢 HOT 1
- 请问,如何确保子分类和父分类的一致性? HOT 1
- validation的数量级 HOT 1
- 关于专利数据集的问题 HOT 2
- Attention visuals tensor has exactly same values
- 使用GPU训练需要修改哪些参数
- 关于专利数据集的问题
- Some problems for running the codes
- 感谢您优秀的分享!有一些问题想请教! HOT 1
- test的预测 HOT 1
- 试过中文数据集吗
- 测试集与预测值的对应
- Value Error: Cannot create a tensor proto whose content is larger than 2GB.
- Runtime error HOT 1
- Question about the class dependency module HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hierarchical-multi-label-text-classification.