Git Product home page Git Product logo

Comments (2)

RandolphVI avatar RandolphVI commented on August 24, 2024

@Maaaaxsh

对于如下的数据样本:{"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.

RandolphVI avatar RandolphVI commented on August 24, 2024

@Maaaaxsh

再次感谢指正。我更改了 README.md 中表述有误的地方,另外用于举例的 sample,其标签 index 显示从 0 开始编码,避免引起类似误会。

from hierarchical-multi-label-text-classification.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.