Logistic regression
- Form
- Linear.
- Penalty
- L2.
- Solver
- lbfgs, 200 iterations.
Loading…
Logistic regression scores each class with a linear function of the scaled columns. An RBF SVM scores each class from a curved margin. These runs use C=1.0, and the published score is hold-out accuracy on a stratified 25% split.
Do you need a linear score for each class?
A linear function of the scaled columns, or a curved margin from an RBF kernel.
SVM has the higher hold-out accuracy on Iris Flowers; Hold-out accuracy is within 0.01 on Wine (UCI wine recognition) and Customer Segments.
Choose the score the table needs.
This is a choice, not a measured winner.
On Iris Flowers (150 rows, 4 features), Logistic regression reaches hold-out accuracy 0.921 and macro F1 0.923 on 38 test rows. The RBF SVM reaches accuracy 0.947 and macro F1 0.949 on the same 38 rows. A linear SVM on the same split reaches hold-out accuracy 0.974 and macro F1 0.974. The pictures place those hold-out rows on a PCA plane fit to the scaled table and color them by the prediction. SVM has the higher hold-out accuracy on this split.


The link loads the sample when the classification tool has it. Run is still required.
On Wine (UCI wine recognition) (178 rows, 13 features), Logistic regression reaches hold-out accuracy 0.978 and macro F1 0.976 on 45 test rows. The RBF SVM reaches accuracy 0.978 and macro F1 0.976 on the same 45 rows. A linear SVM on the same split reaches hold-out accuracy 0.956 and macro F1 0.956. The pictures place those hold-out rows on a PCA plane fit to the scaled table and color them by the prediction. Hold-out accuracy is within 0.01 on this split.


The link loads the sample when the classification tool has it. Run is still required.
On Customer Segments (200 rows, 5 features), Logistic regression reaches hold-out accuracy 0.900 and macro F1 0.897 on 50 test rows. The RBF SVM reaches accuracy 0.900 and macro F1 0.899 on the same 50 rows. A linear SVM on the same split reaches hold-out accuracy 0.900 and macro F1 0.897. The pictures place those hold-out rows on a PCA plane fit to the scaled table and color them by the prediction. Hold-out accuracy is within 0.01 on this split. The classification tool does not load this sample; the published runs used the segment column that ships with the table.


The link loads the sample when the classification tool has it. Run is still required.
| Dataset | Logistic regression accuracy | Logistic regression macro F1 | RBF SVM accuracy | RBF SVM macro F1 | Linear SVM accuracy | Linear SVM macro F1 | Test rows |
|---|---|---|---|---|---|---|---|
| Iris Flowers | 0.921 | 0.923 | 0.947 | 0.949 | 0.974 | 0.974 | 38 |
| Wine (UCI wine recognition) | 0.978 | 0.976 | 0.978 | 0.976 | 0.956 | 0.956 | 45 |
| Customer Segments | 0.900 | 0.897 | 0.900 | 0.899 | 0.900 | 0.897 | 50 |
Hinge loss ignores points outside the margin, and log loss never quite reaches zero.
probability=True is Platt scaling and is not what the table shows.
A new row is labeled by the fitted logistic regression or the fitted SVM.
Logistic regression scores each class with a linear function of the scaled columns. An RBF SVM scores each class from a curved margin. These runs use C=1.0, and the published score is hold-out accuracy on a stratified 25% split.
Method: StandardScaler, drop constant columns. Comparison code version 8fbe69461da4 (scripts/seo/build_compare_runs.py). scikit-learn 1.4.2. Seed 42. Logistic regression and the RBF SVM were fit on 2026-11-12. The linear SVM was fit on that same split. The class column is the training target. Scores are the stratified 25% hold-out. Iris Flowers: UCI Machine Learning Repository, Iris (Fisher, 1936). License: CC BY 4.0. Wine (UCI wine recognition): UCI Machine Learning Repository, wine recognition. License: CC BY 4.0. Customer Segments: Synthetic customer records bundled with this site. License: Generated for demos; no external license.
Results computed, published, and last updated on 2026-11-12.
The comparison sentences are filled from these published runs by a fixed template, so the scores can be checked against the same datasets in the tool.
Maintainer: nikolaou1982.
Contact: nick1982100@gmail.com.