pub enum EncodingSpec {
Float,
IntAsFloat,
BoolAsFloat,
Categorical {
ordering: CategoryOrdering,
},
}Expand description
Per-column encoding directive. Each feature/label column must have one and only one of these. Phase 1 supports four encodings; richer schemes (one-hot, embedding lookup) are deferred to Phase 3.
Variants§
Float
Column::Float → f64 pass-through.
IntAsFloat
Column::Int → f64 via as f64 cast (lossy for |x| ≥ 2^53;
caller’s responsibility to know).
BoolAsFloat
Column::Bool → 0.0 / 1.0.
Categorical
Column::Str | Categorical | CategoricalAdaptive → integer code
from a fresh ByteDictionary (cast to f64). Dictionary built
over all source rows before any split is materialized.
Fields
§
ordering: CategoryOrderingTrait Implementations§
Source§impl Clone for EncodingSpec
impl Clone for EncodingSpec
Source§fn clone(&self) -> EncodingSpec
fn clone(&self) -> EncodingSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EncodingSpec
impl Debug for EncodingSpec
Source§impl PartialEq for EncodingSpec
impl PartialEq for EncodingSpec
Source§fn eq(&self, other: &EncodingSpec) -> bool
fn eq(&self, other: &EncodingSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EncodingSpec
Auto Trait Implementations§
impl Freeze for EncodingSpec
impl RefUnwindSafe for EncodingSpec
impl Send for EncodingSpec
impl Sync for EncodingSpec
impl Unpin for EncodingSpec
impl UnsafeUnpin for EncodingSpec
impl UnwindSafe for EncodingSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more