pub struct ChaidSplit {
pub feature_idx: usize,
pub category_groups: Vec<Vec<String>>,
pub chi_squared: f64,
pub p_value: f64,
pub degrees_of_freedom: usize,
pub significance_level: f64,
}Expand description
CHAID (Chi-squared Automatic Interaction Detection) split information
Fields§
§feature_idx: usizeFeature index
category_groups: Vec<Vec<String>>Category groups after merging based on chi-squared tests
chi_squared: f64Chi-squared statistic
p_value: f64P-value of the chi-squared test
degrees_of_freedom: usizeDegrees of freedom
significance_level: f64Significance level used
Implementations§
Source§impl ChaidSplit
impl ChaidSplit
Sourcepub fn analyze_categorical_split(
feature_values: &[String],
target_values: &[i32],
significance_level: f64,
) -> Result<Option<Self>>
pub fn analyze_categorical_split( feature_values: &[String], target_values: &[i32], significance_level: f64, ) -> Result<Option<Self>>
Perform CHAID splitting analysis for a categorical feature
Sourcepub fn is_significant(&self) -> bool
pub fn is_significant(&self) -> bool
Check if the split is statistically significant
Trait Implementations§
Source§impl Clone for ChaidSplit
impl Clone for ChaidSplit
Source§fn clone(&self) -> ChaidSplit
fn clone(&self) -> ChaidSplit
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 moreAuto Trait Implementations§
impl Freeze for ChaidSplit
impl RefUnwindSafe for ChaidSplit
impl Send for ChaidSplit
impl Sync for ChaidSplit
impl Unpin for ChaidSplit
impl UnwindSafe for ChaidSplit
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