Class: Libsvm::SvmParameter

Inherits:
Object
  • Object
show all
Defined in:
lib/libsvm/svm_parameter.rb,
ext/libsvm/libsvm.c

Overview

Represents the learning parameter struct.

The parameters in this object control how the SVM model is trained specifically.

This class represents the struct svm_parameter.

Instance Attribute Summary collapse

Instance Attribute Details

#cFloat

The parameter C to use for this model.

Returns:

  • (Float)


# File 'lib/libsvm/svm_parameter.rb', line 64

#cache_sizeInteger

Size of the kernel cache, in megabytes.

Returns:

  • (Integer)


# File 'lib/libsvm/svm_parameter.rb', line 52

#coef0Float

Coeffectient 0, relevant for kernel types SIGMOID and POLY.



# File 'lib/libsvm/svm_parameter.rb', line 45

#degreeInteger

Degree parameter, relevant for POLY kernel type.

Returns:

  • (Integer)

See Also:



# File 'lib/libsvm/svm_parameter.rb', line 31

#epsFloat

Stopping criterion parameter.

Returns:

  • (Float)


# File 'lib/libsvm/svm_parameter.rb', line 58

#gammaFloat

Gamma parameter, relevant for kernel types RBF, SIGMOID and POLY.



# File 'lib/libsvm/svm_parameter.rb', line 38

#kernel_typeLINEAR, ...

Type of kernel to use.

Returns:

  • (LINEAR, POLY, RBF, SIGMOID, PRECOMPUTED)

See Also:



# File 'lib/libsvm/svm_parameter.rb', line 23

#label_weightsHash

Hash with indices of labels as keys and weights as values.

These weights are used to change the penalty for specific labels (classes). If the weight for a label is not changed, it is set to 1.0.

Returns:



# File 'lib/libsvm/svm_parameter.rb', line 70

#nuFloat

The nu parameter in nu-SVM, nu-SVR, and one-class-SVM (i.e. when the Libsvm::SvmParameter#svm_type is given as NU_SVC, NU_SVR or ONE_CLASS).

Returns:

  • (Float)

See Also:



# File 'lib/libsvm/svm_parameter.rb', line 80

#pFloat

The epsilon in epsilon-insensitive loss function of epsilon-SVM regression (i.e. when the Libmsvm::SvmParameter#svm_type is given as Libsvm::SvmType::EPSILON_SVR).

Returns:

  • (Float)


# File 'lib/libsvm/svm_parameter.rb', line 89

#probabilityInteger

Integer interpreted as boolean value.

Controls if the model can create probability values for classifications in addition to the classification.

Returns:

  • (Integer)

    0 meaning false, 1 true



# File 'lib/libsvm/svm_parameter.rb', line 105

#shrinkingInteger

Integer interpreted as boolean value.

Controls if shrinking heuristics is used.

Returns:

  • (Integer)

    0 meaning false, 1 true



# File 'lib/libsvm/svm_parameter.rb', line 97

#svm_typeC_SVC, ...

Type of SVM to use. This parameter controls if the model classifies or performs regression, if a one-class model is built, or if the NU variant of SVM is used.

Returns:

  • (C_SVC, NU_SVC, ONE_CLASS, EPSILON_SVR, NU_SVR)

See Also:



# File 'lib/libsvm/svm_parameter.rb', line 14