pub struct DenseTable { /* private fields */ }Expand description
Arrow-backed dense table for tabular regression/classification data.
Features are ingested once, converted into a raw Arrow representation, and then binned into compact integer columns. The model trainers work primarily from those binned columns.
Implementations§
Source§impl DenseTable
impl DenseTable
Sourcepub fn new(x: Vec<Vec<f64>>, y: Vec<f64>) -> Result<Self, DenseTableError>
pub fn new(x: Vec<Vec<f64>>, y: Vec<f64>) -> Result<Self, DenseTableError>
Construct a dense table with the default canary count and automatic numeric binning.
Sourcepub fn with_canaries(
x: Vec<Vec<f64>>,
y: Vec<f64>,
canaries: usize,
) -> Result<Self, DenseTableError>
pub fn with_canaries( x: Vec<Vec<f64>>, y: Vec<f64>, canaries: usize, ) -> Result<Self, DenseTableError>
Construct a dense table while choosing how many canary copies to append.
Sourcepub fn with_options(
x: Vec<Vec<f64>>,
y: Vec<f64>,
canaries: usize,
numeric_bins: NumericBins,
) -> Result<Self, DenseTableError>
pub fn with_options( x: Vec<Vec<f64>>, y: Vec<f64>, canaries: usize, numeric_bins: NumericBins, ) -> Result<Self, DenseTableError>
Construct a dense table with full preprocessing control.
pub fn n_rows(&self) -> usize
pub fn n_features(&self) -> usize
pub fn canaries(&self) -> usize
pub fn numeric_bin_cap(&self) -> usize
pub fn binned_feature_count(&self) -> usize
pub fn feature_column(&self, index: usize) -> FeatureColumnRef<'_>
pub fn feature_value(&self, feature_index: usize, row_index: usize) -> f64
pub fn is_missing(&self, feature_index: usize, row_index: usize) -> bool
pub fn is_binary_feature(&self, index: usize) -> bool
pub fn binned_feature_column(&self, index: usize) -> BinnedFeatureColumnRef<'_>
pub fn binned_value(&self, feature_index: usize, row_index: usize) -> u16
pub fn binned_boolean_value( &self, feature_index: usize, row_index: usize, ) -> Option<bool>
pub fn binned_column_kind(&self, index: usize) -> BinnedColumnKind
pub fn is_canary_binned_feature(&self, index: usize) -> bool
pub fn is_binary_binned_feature(&self, index: usize) -> bool
pub fn target(&self) -> &Float64Array
Trait Implementations§
Source§impl Clone for DenseTable
impl Clone for DenseTable
Source§fn clone(&self) -> DenseTable
fn clone(&self) -> DenseTable
Returns a duplicate of the value. Read more
1.0.0 · 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 DenseTable
impl Debug for DenseTable
Source§impl TableAccess for DenseTable
impl TableAccess for DenseTable
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
fn is_canary_binned_feature(&self, index: usize) -> bool
Auto Trait Implementations§
impl Freeze for DenseTable
impl RefUnwindSafe for DenseTable
impl Send for DenseTable
impl Sync for DenseTable
impl Unpin for DenseTable
impl UnsafeUnpin for DenseTable
impl UnwindSafe for DenseTable
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