Downloads · 30 days
0
KubraParmak/digit-classifier-model
digit-classifier-model is a image classification model from KubraParmak. Use it when you need a label for an image. The card lists the license as mit.
A Voting Classifier (SVM + Random Forest + KNN) predicting handwritten digits (0–9) from 8×8 pixel images.
Downloads · 30 days
0
Access
Public
Updated Jun 26, 2026
Repo size
24.3 MB
Likes
0
Public
Click a slice to open those files.
.joblib24.3 MB · 99%
From the Hugging Face model README
A Voting Classifier (SVM + Random Forest + KNN) predicting handwritten digits (0–9) from 8×8 pixel images.
Trained on the sklearn digits dataset — 1797 samples, 64 features (8×8 grayscale pixel values, range 0–16).
StandardScaler, fit on the training split only.PCA (n_components=0.95 — 95% variance retained), reducing 64 features to ~40 components.Hard voting ensemble of three classifiers, each tuned via GridSearchCV:
| Classifier | Best Params |
|---|---|
| SVM | C, kernel searched over [0.1, 1, 10] × ["linear", "rbf"] |
| Random Forest | n_estimators searched over [50, 100, 200] |
| KNN | n_neighbors searched over [3, 5, 7] |
digit_classifier_artifact.joblib: dict with {"model", "scaler", "pca"}.digit-image-classification.ipynb: full notebook (preprocessing, GridSearchCV, VotingClassifier, evaluation).import joblib
import numpy as np
from huggingface_hub import hf_hub_download
path = hf_hub_download(repo_id="KubraParmak/digit-classifier-model", filename="digit_classifier_artifact.joblib")
artifact = joblib.load(path)
scaler = artifact["scaler"]
pca = artifact["pca"]
model = artifact["model"]
# X: numpy array of shape (n_samples, 64), pixel values in range 0–16
X_scaled = scaler.transform(X)
X_pca = pca.transform(X_scaled)
predictions = model.predict(X_pca)
Test accuracy: 0.97 (VotingClassifier, hard voting, 5-fold CV).
See KubraParmak/digit-image-classification for an interactive Gradio demo.