pub trait TableAccess: Sync {
Show 14 methods
// Required methods
fn n_rows(&self) -> usize;
fn n_features(&self) -> usize;
fn canaries(&self) -> usize;
fn numeric_bin_cap(&self) -> usize;
fn binned_feature_count(&self) -> usize;
fn feature_value(&self, feature_index: usize, row_index: usize) -> f64;
fn is_missing(&self, feature_index: usize, row_index: usize) -> bool;
fn is_binary_feature(&self, index: usize) -> bool;
fn binned_value(&self, feature_index: usize, row_index: usize) -> u16;
fn binned_boolean_value(
&self,
feature_index: usize,
row_index: usize,
) -> Option<bool>;
fn binned_column_kind(&self, index: usize) -> BinnedColumnKind;
fn is_binary_binned_feature(&self, index: usize) -> bool;
fn target_value(&self, row_index: usize) -> f64;
// Provided method
fn is_canary_binned_feature(&self, index: usize) -> bool { ... }
}Expand description
Common interface consumed by tree trainers and predictors.
The trait exposes both raw floating-point values and pre-binned values. Training mostly works on the binned representation for speed and predictable threshold semantics; the raw values are still available for export and some user-facing reconstruction tasks.