๐Ÿ“
Text Input
"Business news..."
โ†’
๐Ÿ”ข
TF-IDF
Fixed
5000 features
โ†’
๐Ÿค–
Classifier
Choose Below
Select methods
โ†’
โœจ
Results
96-98% accuracy

๐Ÿ“Š Feature Extraction

๐Ÿ”ค

TF-IDF (Term Frequency - Inverse Document Frequency)

Converts text into numerical vectors by weighting words based on frequency and uniqueness. Common words (e.g., "the", "is") get low weights, while distinctive words get high weights.

Formula: TF-IDF(t,d) = TF(t,d) ร— IDF(t) = (term freq in doc) ร— log(total docs / docs with term)

๐Ÿค– Classification Algorithms

๐ŸŽฒ

Naive Bayes

Probabilistic classifier based on Bayes theorem. Fast, efficient, works well with small datasets.

๐Ÿ“ˆ 96.7%
๐Ÿ“ˆ

Logistic Regression

Linear model with sigmoid activation. Simple, interpretable, good baseline.

๐Ÿ“ˆ 97.9%
๐ŸŽฏ

Support Vector Machine

Find optimal hyperplane for classification. Powerful for high-dimensional data.

๐Ÿ“ˆ 98.2%
๐ŸŒฒ

Random Forest

Ensemble of decision trees. Robust, handles non-linearity, reduces overfitting.

๐Ÿ“ˆ 97.6%
๐Ÿง 

Neural Network (MLP)

Multi-layer perceptron with hidden layers. Can learn complex patterns.

๐Ÿ“ˆ 98.5%
๐Ÿš€

XGBoost

Gradient boosting algorithm. Often wins ML competitions. High performance.

๐Ÿ“ˆ 98.8%

๐Ÿ’ป Full Implementation Code

Ready-to-run Python code with all 6 classifiers. Includes dataset download, TF-IDF extraction, training, and evaluation.

โณ Loading code...

Features:

  • โœ… Automatic dataset download from GitHub Pages
  • โœ… TF-IDF feature extraction (5000 features, bigrams)
  • โœ… 6 classifiers: Naive Bayes, Logistic, SVM, Random Forest, MLP, XGBoost
  • โœ… Training & inference time measurements
  • โœ… Classification reports & confusion matrices
  • โœ… Visualizations saved as PNG files
๐Ÿš€

Run in Google Colab

Open this notebook in Google Colab for interactive execution with free GPU access.

โšก

No Setup Required

All dependencies pre-installed

๐ŸŽฎ

Interactive

Modify code and see results instantly

๐Ÿ’พ

Save Results

Download plots and models

Note: The notebook will open in a new tab. You may need to sign in with your Google account.