Function forust_ml::utils::pivot_on_split_exclude_missing
source · pub fn pivot_on_split_exclude_missing(
index: &mut [usize],
feature: &[u16],
split_value: u16
) -> (usize, usize)Expand description
Provided a list of index values, pivot those values around a specific split value so all of the values less than the split value are on one side, and then all of the values greater than or equal to the split value are above. Missing values, will be pushed to the bottom, a value of zero is missing in this case.
WARNING!!! Currently, this function fails, if all the values are missing…
index- The index values to sort.feature- The feature vector to use to sort the index by.split_value- the split value to use to pivot on.