MachineLearning/svm library
🧠Support Vector Machine (linear SVM, primal hinge loss)
A compact linear SVM trained with subgradient descent on the primal
hinge-loss objective. Returns weights [bias, w1, w2, ...] where the
first element is the intercept term. Designed for clarity and small
datasets; for large-scale problems prefer specialized libraries.
Contract:
- Input:
XasList<List<double>>(n x m),yasList<int>with labels {-1, +1}. - Output:
List<double>of length m+1 representing bias followed by weights.
Time Complexity: O(epochs * n * m) Space Complexity: O(m)
Classes
- SVMModel
- Thin wrapper providing fit/predict interface for the linear SVM.