Text Classification
Joblib
Scikit-learn
Vietnamese
scikit-learn
vietnamese
nlp
sonar
tf-idf
logistic-regression
svc
support-vector-classification
Eval Results (legacy)
Instructions to use undertheseanlp/sonar_core_1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use undertheseanlp/sonar_core_1 with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("undertheseanlp/sonar_core_1", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
Commit History
-
Enhance README.md with advanced prediction functionality and top-3 results
Vu Anh +1: Claude- Add enhanced predict_text() function with top 3 predictions across all model examples - Update VNTC model section with detailed prediction output including confidence scores - Update UTS2017_Bank model section with enhanced prediction and latest SVC model - Improve combined models section with comprehensive domain detection and detailed results - Add consistent prediction interface matching inference.py implementation - Include top 3 category predictions with probabilities for better transparency - Enhanced examples show confidence levels and alternative predictions - Updated function signatures to return (prediction, confidence, top_predictions) - Improved classify_vietnamese_text() with domain detection and detailed output Key improvements: - Users can now see top 3 most likely categories with probabilities - Enhanced transparency in model predictions and confidence levels - Consistent prediction interface across all usage examples - Production-ready code examples with comprehensi…782db40
-
Update README.md with comprehensive SVC performance metrics
Vu Anh +1: Claude- Update model-index with correct SVC performance: 92.80% (VNTC), 72.47% (UTS2017_Bank) - Add SVC and support-vector-classification tags to metadata - Update model description to highlight SVC performance improvements - Replace algorithm description to include SVC/Logistic Regression pipeline - Update performance metrics sections with detailed SVC vs Logistic Regression comparison - Add SVC-specific improvements: LOAN (+0.50 F1), DISCOUNT (+0.22 F1), INTEREST_RATE (+0.18 F1) - Update training examples to recommend SVC for optimal performance - Replace model file references with latest SVC model (uts2017_bank_classifier_20250928_060819.joblib) - Add training time comparisons and computational trade-offs documentation - Remove outdated system card file (replaced by updated version in paper/ directory) Performance improvements documented: - VNTC: 92.33% → 92.80% accuracy with SVC - UTS2017_Bank: 70.96% → 72.47% accuracy with SVC - Weighted F1-score: 0.63 → 0.66 with SVC - Comprehensive m…fe38ff4 -
Clean up training runs and enhance model export functionality
Vu Anh +1: Claude- Remove 8 training runs without exported models to optimize repository size - Keep only runs/20250928_060819 (SVC model with 72.47% accuracy and exported model) - Update train.py with --export-model flag and joblib format support - Enhance use_this_model.py with consistent prediction interface matching inference.py - Add model export functionality for distribution and publishing - Optimize repository structure while preserving all distributed models Repository cleanup: - Removed runs: 20250928_054424, 20250928_054605, 20250928_054642, 20250928_054802 - Removed runs: 20250928_054813, 20250928_054840, 20250928_055536, 20250928_060804 - Preserved: runs/20250928_060819 (corresponds to uts2017_bank_classifier_20250928_060819.joblib) - All exported models maintained for inference and deployment 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>742fa4d -
Update technical report with comprehensive SVC vs Logistic Regression comparison
Vu Anh +1: Claude- Add detailed comparative per-class performance analysis for UTS2017_Bank dataset - Update system card with SVC performance metrics (72.47% vs 70.96% accuracy) - Include side-by-side comparison table showing F1-score improvements - Add new inference.py script for local model testing - Export optimized SVC model (uts2017_bank_classifier_20250928_060819.joblib) - Fix ruff linting issues in inference.py (remove unused imports) - Update LaTeX technical report with comprehensive analysis and conclusions Key improvements documented: - LOAN category: +0.50 F1-score improvement with SVC - DISCOUNT category: +0.22 F1-score improvement with SVC - INTEREST_RATE category: +0.18 F1-score improvement with SVC - Overall weighted F1-score: +0.03 improvement with SVC 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>05cf955 -
Update analysis results and system card with SVC model performance
Vu Anh +1: Claude- Added SVC model results achieving 92.80% accuracy on VNTC dataset - Updated paper with comparative analysis between SVC and Logistic Regression - Included training time comparisons showing accuracy-efficiency trade-offs - Enhanced results presentation in analyze_results.py - Added changelog entry for September 28, 2025 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>598035a -
Transform system card to model card format and enhance documentation
Vu Anh +1: Claude- Transform paper/Sonar Core 1 - System Card.md from technical report to Hugging Face model card format - Update header structure to emphasize Vietnamese text classification model - Simplify performance metrics with summary table instead of detailed per-class tables - Streamline limitations and ethical considerations sections - Update usage examples to be more practical and concise - Add comprehensive Google Colab tutorial to DEVELOPERS.md - Enhance train.py with 9 scikit-learn algorithms and comparison capabilities - Add analyze_results.py script for training run comparison - Update LaTeX technical report with formal academic structure - Clean up gitignore and directory structure 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>16e985c -
Organize paper folder with gitignore and move System Card
Vu Anh +1: Claude- Add .gitignore to paper folder to track only .pdf, .tex, and .md files - Move "Sonar Core 1 - System Card.md" from root to paper folder - Fix UTF-8 encoding issue in LaTeX file for Vietnamese text 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>768e141 -
Add LaTeX version of System Card for academic publication
Vu Anh +1: Claude- Create paper/ folder for academic documents - Convert 'Sonar Core 1 - System Card.md' to 'paper/sonar_core_1_system_card.tex' - Properly format tables, equations, and code listings for LaTeX - Include comprehensive LaTeX packages for academic formatting - Ready for academic submission and PDF generation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>4e7a881 -
Update citation title to descriptive model name
Vu Anh +1: Claude- Change title from 'sonar_core_1 (Revision 0712d08)' to 'Sonar Core 1 - Vietnamese Text Classification Model' - Use consistent descriptive title across both README.md and System Card - Improves citation clarity and academic referencing - Maintains same DOI and Hugging Face Hub URL 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>e8e41ff -
Add prominent System Card links to README.md
Vu Anh +1: Claude- Add prominent System Card link after main description with emoji - Update existing System Card reference with Hugging Face Hub URL - Link points to: https://huggingface.co/undertheseanlp/sonar_core_1/blob/main/Sonar%20Core%201%20-%20System%20Card.md - Improves discoverability of detailed model documentation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>4c367a2 -
Update citation format to Hugging Face standard
Vu Anh +1: Claude- Change from @techreport to @misc format - Add DOI: 10.57967/hf/6599 - Update URL to Hugging Face Hub - Include revision hash (0712d08) - Set publisher as Hugging Face - Apply consistently to both README.md and System Card 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>95e19f0 -
Update README.md with comprehensive Hugging Face Hub usage examples
Vu Anh +1: Claude- Move and enhance 'Using the Model for Prediction' section - Replace local file usage with hf_hub_download examples - Add separate examples for VNTC and UTS2017_Bank models - Include advanced usage with both models and auto-detection - Provide practical Vietnamese text classification examples - All examples use timestamped model filenames from Hub 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>8853ec8 -
Fix dataset references in README.md
Vu Anh +1: Claude- Change uts2017_bank to undertheseanlp/UTS2017_Bank - Use correct Hugging Face dataset ID format - Fixes Hugging Face Hub dataset validation error 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>1a16177 -
Update README.md and remove old model files
Vu Anh +1: Claude- Update README.md with latest information - Remove old model files with generic names - New descriptive model files already committed with timestamps 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>0712d08 -
Rename model files with descriptive names and timestamps
Vu Anh +1: Claude- Rename sklearn_model.joblib → vntc_classifier_20250927_161550.joblib - Rename sklearn_model_uts2017_bank.joblib → uts2017_bank_classifier_20250927_161733.joblib - Update use_this_model.py to use new descriptive filenames - Timestamps indicate training date and time for better versioning 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>9cf063d -
Add UTS2017_Bank model and dual-model usage demonstration
Vu Anh +1: Claude- Upload sklearn_model_uts2017_bank.joblib (UTS2017_Bank model, 70.96% accuracy) - Update use_this_model.py to support both VNTC and UTS2017_Bank models - Add separate examples for news and banking text classification - Include interactive mode selection for both models - Provide clear usage examples for both model types 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>1a2922b -
Clean up use_this_model.py to use only Hugging Face Hub
Vu Anh +1: Claude- Remove local fallback, use only hf_hub_download - Script now properly demonstrates model usage from published hub - Model successfully downloads and works for Vietnamese text classification 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>10d299f -
Add trained VNTC model and usage demonstration script
Vu Anh +1: Claude- Upload sklearn_model.joblib (VNTC model, 92.33% accuracy) for Hugging Face Hub - Add use_this_model.py to demonstrate model usage from Hub - Model supports Vietnamese news classification across 10 categories 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>3715499 -
Add dual dataset support and update system documentation
Vu Anh +1: Claude- Enhanced train.py to support both VNTC and UTS2017_Bank datasets - Added --dataset parameter for dataset selection - Updated System Card with UTS2017_Bank performance metrics - Achieved 92.33% accuracy on VNTC and 70.96% on UTS2017_Bank - Cleaned up redundant files and old training runs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>f62e707
-
Add Google Colab compatibility and developer documentation
Vu Anh +1: Claude- Fixed argparse compatibility for Google Colab/Jupyter environments - Added train_notebook() function for easy notebook usage - Created comprehensive developer documentation (DEVELOPERS.md) - Includes setup instructions, API reference, and usage examples - Documents all 14 UTS2017_Bank dataset categories - Provides troubleshooting guide for common issues 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>a8bf530 -
Apply ruff linting and formatting to train.py
Vu Anh +1: Claude- Removed unused imports (hashlib, pickle) - Applied consistent code formatting with ruff - Fixed all linting issues - Code now passes all ruff checks 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>b3ac9a6 -
Replace Sonar model with UTS2017_Bank Vietnamese text classification
Vu Anh +1: Claude- Replaced generic Sonar training script with UTS2017_Bank dataset implementation - Added support for Hugging Face datasets library - Implemented TF-IDF + Logistic Regression/SVC models for Vietnamese text - Achieved 71% accuracy on UTS2017_Bank banking dataset (14 categories) - Removed redundant model files and unused scripts - Updated dependencies to include datasets package 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>197dc42 -
Add Sonar Core 1 system card documentation
Vu Anh +1: ClaudeAdded comprehensive system card documenting the Vietnamese news classification model, including technical specifications, performance metrics, and usage guidelines. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>e749318
-
Simplify validation script
Vu Anh- Remove complex validation data generation - Use simple hardcoded sample data - Make output cleaner and more conciseab93f3c -
Add model validation script with Hugging Face Hub support
Vu Anh- Add validate.py to download and test model from HF Hub - Create script to save model in joblib format - Add huggingface-hub and joblib dependencies - Include sklearn_model.joblib for HF Hub compatibility - Update .gitignore to allow sklearn_model.joblib81717a0 -
Add ruff linter and format code
Vu Anh- Add ruff as dev dependency - Format code according to ruff standards - All checks passingae0d039 -
Add comprehensive model card metadata for Hugging Face
Vu Anh- Add YAML frontmatter with model metadata - Include tags, metrics, and model-index - Add model description and limitations - Include ethical considerations - Document training procedure and evaluation108511c -
Initial commit: Add scikit-learn Sonar classification model
Vu Anh- Implement Random Forest classifier with StandardScaler preprocessing - Add training script with sample data generation - Configure project with uv package manager - Add comprehensive README documentationa7b2e06 -
initial commit
Verified signature3ca83a6