Code Monkey home page Code Monkey logo

Comments (3)

timoschick avatar timoschick commented on July 29, 2024

Hi @ankushkundaliya ,
thanks! Currently, PET does not support multi-label classification. You could try to rephrase the task as multiple single-label classifications. For example, let's say you want to know which topics from a given list (let's say, ["politics", "sports", "economics"]) a text x covers. You could reformulate this as three binary classification tasks, with PVPs like

  • P(x) = x. Is this text about politics? [MASK] for the first task
  • P(x) = x. Is this text about sports? [MASK] for the second task
  • P(x) = x. Is this text about economics? [MASK] for the third task

and for all tasks, you could use a verbalizer that maps a match (i.e., the text is about the given topic) to Yes (or True) and a no-match to No (or False).

from pet.

NielsRogge avatar NielsRogge commented on July 29, 2024

Hi @timoschick,

I am considering using the approach you explained above to turn a multi-label classification problem (with N labels) into N binary classification tasks. However, I wonder whether there's a big difference between using a single MLM to be fine-tuned rather than different MLMs for each pattern.

Because for example suppose that you have a very large amount of labels (such as 500), fine-tuning 500 MLMs is simply not feasible. Is using a single MLM appropriate?

Kind regards,

Niels

from pet.

timoschick avatar timoschick commented on July 29, 2024

Hi @NielsRogge,
we've run some experiments to answer that very question (I can't go into details as the corresponding paper is currently under review), and the short answer is: Yes, you can use a single MLM. However, you'll have to modify the source code of this library accordingly, as it does not support using a single MLM out-of-the-box.

from pet.

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.