Package org.tribuo.common.libsvm
Enum Class KernelType
- All Implemented Interfaces:
Serializable
,Comparable<KernelType>
,Constable
Kernel types from libsvm.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic KernelType
getKernelType
(int nativeType) Converts the LibSVM int id into the enum value.int
Gets LibSVM's int id.static KernelType
Returns the enum constant of this class with the specified name.static KernelType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LINEAR
A linear kernel function (i.e., a dot product). -
POLY
A polynomial kernel of the form (gamma*u'*v + coef0)^degree -
RBF
An RBF kernel of the form exp(-gamma*|u-v|^2) -
SIGMOID
A sigmoid kernel of the form tanh(gamma*u'*v + coef0)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getNativeType
public int getNativeType()Gets LibSVM's int id.- Returns:
- The int id.
-
getKernelType
Converts the LibSVM int id into the enum value.- Parameters:
nativeType
- The LibSVM id.- Returns:
- The corresponding enum.
-