Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a param-free classification model #821

Merged
merged 8 commits into from
Jul 18, 2023
Merged

Add a param-free classification model #821

merged 8 commits into from
Jul 18, 2023

Conversation

c4n
Copy link
Contributor

@c4n c4n commented Jul 17, 2023

What does this changes

Add a param-free classification model from “Low-Resource” Text Classification: A Parameter-Free Classification Method with Compressors (Jiang et al., Findings 2023)

Your checklist for this pull request

🚨Please review the guidelines for contributing to this repository.

  • Passed code styles and structures
  • [] Passed code linting checks and unit test

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@coveralls
Copy link

coveralls commented Jul 17, 2023

Coverage Status

coverage: 81.04% (+0.09%) from 80.955% when pulling acf4533 on c4n:master into dfed5ff on PyThaiNLP:dev.

("นี่เป็นบทความหนึ่ง", "Neutral")
]
model = GzipModel(training_data)
self.assertIsNotNone(model.predict("รู้สึกดีจัง", k=3))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it better to modify this assert to also verify the correctness of the prediction?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, I get the result from the test:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we can expect much from this few-shot classifier. May be sentiment analysis is not the best application to test either.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

News classification seems to work well (at least on the paper)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I updated the test.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we can expect much from this few-shot classifier. May be sentiment analysis is not the best application to test either.

I generally agree, but I just wanted to make the test suite slightly less confusing.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 5 Code Smells

No Coverage information No Coverage information
2.9% 2.9% Duplication

@wannaphong wannaphong requested a review from p16i July 18, 2023 01:48
Copy link
Contributor

@p16i p16i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation looks good to me.

@p16i
Copy link
Contributor

p16i commented Jul 18, 2023

@wannaphong do we have to fix the MacOS error?

@wannaphong
Copy link
Member

@wannaphong do we have to fix the MacOS error?

I will fix the MacOS error after this pull request. The error is come from tensorflow (again).

@wannaphong wannaphong added this to the 4.1 milestone Jul 18, 2023
@wannaphong wannaphong added the enhancement enhance functionalities label Jul 18, 2023
@wannaphong wannaphong merged commit 1f480b1 into PyThaiNLP:dev Jul 18, 2023
This was referenced Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement enhance functionalities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants