public enum KernelType extends Enum<KernelType> implements Serializable
Enum Constant and Description |
---|
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)
|
Modifier and Type | Method and Description |
---|---|
static KernelType |
getKernelType(int nativeType)
Converts the LibSVM int id into the enum value.
|
int |
getNativeType()
Gets LibSVM's int id.
|
static KernelType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static KernelType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final KernelType LINEAR
public static final KernelType POLY
public static final KernelType RBF
public static final KernelType SIGMOID
public static KernelType[] values()
for (KernelType c : KernelType.values()) System.out.println(c);
public static KernelType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getNativeType()
public static KernelType getKernelType(int nativeType)
nativeType
- The LibSVM id.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.