pub fn new(
        names: &[&str],
        weight: f64,
        is_class: bool,
        metric: Metric,
        norm: norm::Norm,
        scale: Option<f64>,
    ) -> Self {
        assert!(names.len() == 1 || !is_class);
        assert!(norm == norm::Norm::None || !is_class);
        InputLayer {
            names: names.iter().map(|x| (&**x).to_string()).collect(),
            indices: None,
            num_columns: None,
            weight,
            is_class,
            metric,
            norm,
            scale: scale.unwrap_or(1.0),
        }
    }
/// Creates a new input layer definition.
Creates a new input layer definition.
Creates a new input layer definition .
pub fn new(
        names: &[&str],
        weight: f64,
        is_class: bool,
        metric: Metric,
        norm: norm::Norm,
        scale: Option<f64>,
    ) -> Self {
        assert!(names.len() == 1 || !is_class);
        assert!(norm == norm::Norm::None || !is_class);
        InputLayer {
            names: names.iter().map(|x| (&**x).to_string()).collect(),
            indices: None,
            num_columns: None,
            weight,
            is_class,
            metric,
            norm,
            scale: scale.unwrap_or(1.0),
        }
    }
pub fn new ( names : & [ & str ] , weight : f64 , is_class : bool , metric : Metric , norm : norm :: Norm , scale : Option < f64 > , ) -> Self { assert ! ( names len ( ) 1 is_class ) ; assert ! ( norm norm Norm None is_class ) ; InputLayer { names : names . iter ( ) . map ( | x | ( & * * x ) . to_string ( ) ) . collect ( ) , indices : None , num_columns : None , weight , is_class , metric , norm , scale : scale . unwrap_or ( 1.0 ) , } }
Creates a new input layer definition.
Creates a new input layer definition .
names
&[&str]
weight
f64
is_class
bool
metric
Metric
norm
norm::Norm
scale
Option<f64>
names
&[&str]
weight
f64
is_class
bool
metric
Metric
norm
norm::Norm
scale
Option<f64>