Git Product home page Git Product logo

Comments (7)

yfpeng avatar yfpeng commented on May 27, 2024

Please use "," to separate the labels. For example,

labels \t sentence
0_0,1_0,2_0,3_0,4_0,5_0,6_0,7_0,8_0,9_0	\t Assessment and Plan... <more notes here>

from bluebert.

snjie209 avatar snjie209 commented on May 27, 2024

Thanks for the quick response. Are you saying also that we should have four columns in train.tsv?

Also, does each label have to be in “0_1” underscore format? What is this meant to illustrate?

And in your code snippet, are you illustrating one row of data?

Thanks for reading

from bluebert.

yfpeng avatar yfpeng commented on May 27, 2024
  1. two columns, one for labels and the other for text
  2. no. you need to figure out how to represent multi-labels yourself.
  3. the header and one row of data.

from bluebert.

snjie209 avatar snjie209 commented on May 27, 2024

Okay thanks again. Just to clarify: If I only have a binary classification task, such as 0,1, then I am assuming the format can be

0 \t Assessment and Plan ...
1 \t Prognosis... 

Where above I am illustrating two rows of data: the first row with a label of 0, the second row with a label of 1. Also no headers in the above

from bluebert.

yfpeng avatar yfpeng commented on May 27, 2024

For binary classification, please use run_bluebert.py

from bluebert.

snjie209 avatar snjie209 commented on May 27, 2024

Thanks Yifan. It seems to be running for me now with run_bluebert.py.

As a note to other readers, it seems that the KeyError is an issue mainly on the original Google Research BERT github. A lot of folks (ex: google-research/bert#559) filed issues with a similar error, and they had to go into the get_labels implemented method and change the method. For me, I changed the labels to return ['0', '1'] to fit the labels of my binary classification task in rub_bluebert.py.

from bluebert.

AliNazeri avatar AliNazeri commented on May 27, 2024

I want to use run_bluebert_multi_labels.py for mimic-iv. I have separated the data into train.tsv and test.tsv. when I run the py file, I receive an error. I want to know how should I feed my labels. now they are like 1sda2,1s6w6,5fef,...
it should be in this 1_0,2_0,.. format?

from bluebert.

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.