bazingagin / npc_gzip

Code for Paper: “Low-Resource” Text Classification: A Parameter-Free Classification Method with Compressors
MIT License
1.77k stars 155 forks source link

How to directly input text for prediction? #2

Open gggdroa opened 1 year ago

bazingagin commented 1 year ago

hey @gggdroa you need to have the training set to make prediction. If you mean using you own custom dataset, you can check the readme: https://github.com/bazingagin/npc_gzip#use-custom-dataset

icang1694 commented 1 year ago

how do i get the prediction on each of my test data?

zbloss commented 1 year ago

Hey @icang1694 , take a look at this feature branch: https://github.com/bazingagin/npc_gzip/tree/v0.0.1-packaging

We are very close to releasing this code with some major refactors available on pypi. This should make generating predictions more clear.

Check out this example specifically: https://github.com/bazingagin/npc_gzip/blob/v0.0.1-packaging/examples/ag_news.py

icang1694 commented 1 year ago

thanks, im able to get prediction from getting the return value pred, correct in calc_acc can i print out the confidence level on each prediction?