How to continue to train SVM based on the previous model
ML System Design practice on Codemia
Design recommenders, ranking systems and training pipelines the way ML interviews actually ask for them, with worked solutions.
Introduction
The short answer is that a standard support vector machine model is usually not incrementally trainable in the way people expect. In libraries such as scikit-learn, estimators like SVC solve a batch optimization problem, so you generally retrain the model on the full dataset instead of “continuing” from the previous fitted state.
That is the key distinction: SVMs are common, but online or partial-fit SVM training is not the default behavior of the usual batch APIs.
Why SVC Does Not Continue Training
Scikit-learn’s SVC and NuSVC do not expose a partial_fit method. After fitting, the model stores support vectors from the solved optimization problem, but it is not designed to resume from that solution with extra samples appended later.
A normal workflow looks like this:
If new training data arrives, the standard approach is to combine old and new training data and fit again.
Retraining the Batch Model
For many datasets, full retraining is the right engineering choice because it preserves the exact estimator family you already validated.
This is not as cheap as incremental learning, but it is the correct approach for ordinary SVC training.
If You Need Incremental Updates, Use Another Estimator
When the real requirement is online learning, use a model that supports it. In scikit-learn, SGDClassifier with hinge loss is often the practical substitute because it approximates a linear SVM and supports partial_fit.
That gives you a model that can be updated with new batches over time.
Choose Based on the Constraint
Use batch retraining when these matter most:
- you need the exact nonlinear
SVCbehavior - the dataset size is still manageable
- reproducibility matters more than update speed
Use an incremental learner when these matter most:
- new data arrives continuously
- full retraining is too expensive
- a linear approximation is acceptable
The mistake is trying to force a batch SVM API into an online-learning problem.
Common Pitfalls
- Expecting
SVCto havepartial_fitlike incremental classifiers do. - Treating retraining on combined data as a workaround rather than the intended batch approach.
- Switching to
SGDClassifierwithout realizing it is a different estimator with different accuracy characteristics. - Updating on new data without preserving the same preprocessing pipeline.
- Comparing old and new models without holding the evaluation set constant.
Summary
- Standard SVM estimators such as scikit-learn
SVCare batch learners, not incremental learners. - To add new data, the normal solution is to retrain on the combined dataset.
- If incremental updates are required, use an estimator that supports
partial_fit, such asSGDClassifierwith hinge loss. - Choose between retraining and online learning based on model requirements, not wishful API expectations.
- Keep preprocessing and evaluation consistent when you change training strategy.
Related reading
- How to continue training model using ModelCheckpoint of Keras
- how to control frequency of loss logging messages when using tf.Estimator?
- How to control GPU memory size with tf.estimator
- How to control tensorflow's VLOG?
- How to control when to compute evaluation vs training using the Estimator API of tensorflow?
- How to convert a Python data generator to a Tensorflow tensor?
- How to convert a tf.estimator to a keras model?
- How to convert .ckpt to .pb?
.png&w=3840&q=75)
Tackling System Design Interview Problems
A short course that equips you with the skills to approach system design interviews methodically.
Start the free courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
ML System Design practice on Codemia
Design recommenders, ranking systems and training pipelines the way ML interviews actually ask for them, with worked solutions.