Struct rustlearn::svm::libsvm::svc::Hyperparameters
[−]
[src]
pub struct Hyperparameters { // some fields omitted }
Hyperparameters for the SVC model.
Methods
impl Hyperparameters
[src]
fn new(dim: usize, kernel: KernelType, num_classes: usize) -> Hyperparameters
fn C(&mut self, C: f64) -> &mut Hyperparameters
Set the regularization parameter C
; smaller values
mean more regularization.
Default is 1.0
.
fn degree(&mut self, degree: i32) -> &mut Hyperparameters
Set the degree of the polynomial kernel. No effect on other kernels. Default: 3.
fn gamma(&mut self, gamma: f64) -> &mut Hyperparameters
Set the gamma parameter of the RBF kernel.
Default is 1 / self.dim
.
fn coef0(&mut self, coef0: f64) -> &mut Hyperparameters
Set the coef0 parameter for the sigmoid kernel.
Default is 0.0
.
fn cache_size(&mut self, cache_size: f64) -> &mut Hyperparameters
Set the libsvm
cache size, in megabytes.
Default is 100.0
.
fn build(&self) -> SVC
Build the SVC model. libsvm
natively supports multiclass
problems via one-vs-one (OvO) estimation, so no one-vs-rest
wrapper is provided.
Trait Implementations
impl Clone for Hyperparameters
[src]
fn clone(&self) -> Hyperparameters
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more