svmtrain compared to fitcsvm

조회 수: 1 (최근 30일)
Diver
Diver 2015년 7월 7일
답변: Ilya 2015년 7월 7일
In the previous depreciated "svmtrain" function, The function will stop and return "No convergence error" if it's couldn't train the svm successfully after certain number of iteration.
However, I notice in the newer "fitcsvm", it returns without any error message, even if no convergence reached. Is there is away to force "fitcsvm" to only return if svm successfully trained, otherwise through an error. Just like "svmtrain".

채택된 답변

Ilya
Ilya 2015년 7월 7일
Check the ConvergenceInfo.Converged property of the returned object to see if optimization converged.
This behavior of fitcsvm is an improvement over svmtrain. First, although optimization does not converge, the model may be still accurate and you can use it. Second, you can use the resume method of the returned object to continue optimization for more iterations. Throwing an error would strip you of both possibilities.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by