Support Vector MachineTable of Contents
The SVM classIntroduction
Class synopsisSVM
class SVM
{
/* Constants */
const
integer
SVM::C_SVC
= 0
;
const
integer
SVM::NU_SVC
= 1
;
const
integer
SVM::ONE_CLASS
= 2
;
const
integer
SVM::EPSILON_SVR
= 3
;
const
integer
SVM::NU_SVR
= 4
;
const
integer
SVM::KERNEL_LINEAR
= 0
;
const
integer
SVM::KERNEL_POLY
= 1
;
const
integer
SVM::KERNEL_RBF
= 2
;
const
integer
SVM::KERNEL_SIGMOID
= 3
;
const
integer
SVM::KERNEL_PRECOMPUTED
= 4
;
const
integer
SVM::OPT_TYPE
= 101
;
const
integer
SVM::OPT_KERNEL_TYPE
= 102
;
const
integer
SVM::OPT_DEGREE
= 103
;
const
integer
SVM::OPT_SHRINKING
= 104
;
const
integer
SVM::OPT_PROPABILITY
= 105
;
const
integer
SVM::OPT_GAMMA
= 201
;
const
integer
SVM::OPT_NU
= 202
;
const
integer
SVM::OPT_EPS
= 203
;
const
integer
SVM::OPT_P
= 204
;
const
integer
SVM::OPT_COEF_ZERO
= 205
;
const
integer
SVM::OPT_C
= 206
;
const
integer
SVM::OPT_CACHE_SIZE
= 207
;
/* Methods */
public __construct
( void
)
public float svm::crossvalidate
( array
$problem
, int $number_of_folds
)
public array getOptions
( void
)
public bool setOptions
( array
$params
)
public SVMModel svm::train
( array
}$problem
[, array $weights
] )Predefined ConstantsSVM Constants
The SVMModel classIntroductionThe SVMModel is the end result of the training process. It can be used to classify previously unseen data. Class synopsisSVMModel
class SVMModel
{
/* Methods */
public bool checkProbabilityModel
( void
)
public __construct
([ string
$filename
] )
public array getLabels
( void
)
public int getNrClass
( void
)
public int getSvmType
( void
)
public float getSvrProbability
( void
)
public bool load
( string
$filename
)
public float predict_probability
( array
$data
)
public float predict
( array
$data
)
public bool save
( string
}$filename
) |