Why is fitcsvm not saving model convergence history?

8 views (last 30 days)
My supervisor would like me to graph the objective function per iteration for my SVM model, and so I was trying to save convergence history.
According to the fitcsvm documentation, if you set 'Verbose' to 2 then convergence history will be found at Mdl.ConvergenceInfo.History
Yet this is not the case when using L1QP as the solver (it is found exactly there when using the SMO solver). This is especially strange as the actual per iteration information is still displayed in the Matlab console/command window, but after training the model there is no History struct under the ConvergenceInfo struct.

Answers (1)

Darshak
Darshak on 6 Feb 2025
Hi Vishesh,
It is correct that when we run fitcsvmwith L1QP as the solver and verbose 2 there is no convergence history generated, but the L1QP solver doesn’t actually work in an iterative manner. This will be due to the working of the algorithm for both the solvers, according to which -
SMO This solver is iterative in nature, due to which we can have more detailed and iterative convergence history, through which we can track progress.
L1QP – The solver is based on solving a quadratic programming problem using optimization routines, which doesn’t involve iteration, so there isn’t any convergence history. Although using verbose we can see more details when we use this.
This is mentioned in the documentation of the fitcsvm function too, which can be found here:
I hope this helps with your question.

Categories

Find more on Manual Performance Optimization in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!