array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'svmmodel.getnrclass.php', 1 => 'SVMModel::getNrClass', 2 => 'Returns the number of classes the model was trained with', ), 'up' => array ( 0 => 'class.svmmodel.php', 1 => 'SVMModel', ), 'prev' => array ( 0 => 'svmmodel.getlabels.php', 1 => 'SVMModel::getLabels', ), 'next' => array ( 0 => 'svmmodel.getsvmtype.php', 1 => 'SVMModel::getSvmType', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/svm/svmmodel/getnrclass.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

SVMModel::getNrClass

(PECL svm >= 0.1.5)

SVMModel::getNrClassReturns the number of classes the model was trained with

说明

public SVMModel::getNrClass(): int

Returns the number of classes the model was trained with, will return 2 for one class and regression models.

参数

此函数没有参数。

返回值

Return an integer number of classes