Skip to main content

oxicuda_seq/ssvm/
cutting_plane.rs

1//! Cutting-plane / sub-gradient SSVM configuration.
2
3/// Hyper-parameters for sub-gradient / cutting-plane SSVM training.
4#[derive(Debug, Clone, Copy)]
5pub struct CuttingPlaneConfig {
6    /// Maximum training epochs.
7    pub max_iter: usize,
8    /// Initial learning rate.
9    pub lr: f64,
10    /// Learning-rate decay: `lr_t = lr / (1 + lr_decay ยท t)`.
11    pub lr_decay: f64,
12    /// L2 regularisation factor on parameters.
13    pub regularisation: f64,
14    /// Stop when total Hamming loss falls below this.
15    pub tol: f64,
16}
17
18impl Default for CuttingPlaneConfig {
19    fn default() -> Self {
20        Self {
21            max_iter: 100,
22            lr: 0.05,
23            lr_decay: 0.01,
24            regularisation: 1e-3,
25            tol: 1e-3,
26        }
27    }
28}