SVMException

The SVMException exception is thrown by the SVM::train() method. It happens when the model could not be trained.

<?php

    $svm = new SVM();
    try {
     $model = $svm->train($data);
    } catch (SVMException $e) {
     print $e->getMessage();
    }

?>

Documentation

See also https://medium.datadriveninvestor.com/machine-learning-with-php-using-support-vector-machine-svm-via-ext-svm-37ef9c3027cd

Related : Exception, Support Vector Machine (SVM)