Built Support Vector Machine(SVM) from scratch in Rust [P]
Mirrored from r/MachineLearning for archival readability. Support the source by reading on the original site.
Built my own SVM classifier from scratch in Rust. It uses SMO optimization, have linear and rbf kernel, uses grid search to tune the hyperparameters.
I tested it on two datasets one using Linear dataset and other using RBF, these were the results:
| Dataset | Kernel | Accuracy | Recall | F1 |
|---|---|---|---|---|
| Banknote Auth | Linear | 96% | 94% | 95% |
| Breast Cancer | RBF | 93% | 100% | 92% |
The plot.rs file, used for plotting only was written using AI as I could not wrap my head around plotters crate, apart from that everything was by my own.
Repo Link: Github Repo
Happy to get some feedback!
[link] [comments]
More from r/MachineLearning
-
A map of the latest 11 million papers split by semantic similarity and time slices [P]
Jun 30
-
Update on CVIL: the free CV interview prep checklist after landing my internship... just added Segmentation, OCR, and VLM sections [D]
Jun 30
-
EACL 2027: Author response and author-reviewer discussion are now two separate stages and allow more time [D]
Jun 30
-
Loss functions in Instance Representation Learning [R]
Jun 29
Discussion (0)
Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.
Sign in →No comments yet. Sign in and be the first to say something.