Files
php-svm/tests/006_train_array.phpt
2010-03-05 23:16:17 +00:00

25 lines
348 B
PHP

--TEST--
Train from an array
--SKIPIF--
<?php
if (!extension_loaded('svm')) die('skip');
?>
--FILE--
<?php
$svm = new svm();
$result = $svm->train(array(array(1, -13 => 1.33)));
var_dump($result);
try {
$svm->train(array(array(1)));
} catch (SvmException $e) {
echo "got exception";
}
?>
--EXPECTF--
object(svmmodel)#%d (%d) {
}
got exception