///|
/// Selects the similarity function used by SVM training and prediction.
pub(all) enum Kernel {
  Linear
  Rbf(Double)
  Polynomial(Double, Double, Int)
} derive(Eq, Debug)

///|
pub fn Kernel::name(self : Kernel) -> String {
  match self {
    Linear => "linear"
    Rbf(_) => "rbf"
    Polynomial(_, _, _) => "polynomial"
  }
}