pub fn make_impute_constant<DIA, M>(
    input_domain: VectorDomain<DIA>,
    input_metric: M,
    constant: DIA::Imputed
) -> Fallible<Transformation<VectorDomain<DIA>, VectorDomain<AtomDomain<DIA::Imputed>>, M, M>>where
    DIA: ImputeConstantDomain + Default,
    DIA::Imputed: 'static + Clone + CheckAtom,
    DIA::Carrier: 'static,
    M: DatasetMetric,
    (VectorDomain<DIA>, M): MetricSpace,
    (VectorDomain<AtomDomain<DIA::Imputed>>, M): MetricSpace,
Expand description

Make a Transformation that replaces null/None data with constant.

If chaining after a make_cast, the input type is Option<Vec<TA>>. If chaining after a make_cast_inherent, the input type is Vec<TA>, where TA may take on float NaNs.

input_domainInput Data Type
vector_domain(option_domain(atom_domain(TA)))Vec<Option<TA>>
vector_domain(atom_domain(TA))Vec<TA>

Arguments

  • input_domain - Domain of the input data. See table above.
  • input_metric - Metric of the input data. A dataset metric.
  • constant - Value to replace nulls with.

Generics

  • DIA - Atomic Input Domain of data being imputed.
  • M - Dataset Metric.