maartensukel/example-textual-classification-citizen-reports: Example of a simple textual classification using TF-IDF and LR.
Posted by jpluimers on 2024/06/04
Cool technology:
[Wayback/Archive] maartensukel/example-textual-classification-citizen-reports: Example of a simple textual classification using TF-IDF and LR.
The classification is done by using a TF-IDF (Term Freuqency – Inversed document frequency) as representation for the text and a logistic regression to classify the text. Optimal hyperparameters for the dataset are found using a gridsearch.
Author: [Wayback/Archive] Maarten Sukel (@MaartenSukel) / Twitter
The source is based on Python Pandas and sci-kit learn (also known as sklearn).
- Example code:
- Example training data:
- Explanation:
- Demo:
- Important sci-kit learn part:
It is in use by the City of Amsterdam, but likely fits a lot more use cases.
Via:
- [Wayback/Archive] Ger on Twitter: “… “
- [Wayback/Archive] Ger on Twitter: “… Daar staat broncode. Hier wat meer uitleg: …”
- [Wayback/Archive] Ger on Twitter: “@maikeltjeonline @plankje55 @Kjoen2u @wsslmn @helenedebruine @KeesSteeman @adamfietst Voor meer techniek @MaartenSukel” / Twitter
–jeroen






Leave a comment