Function forust_ml::utils::pivot_on_split
source · pub fn pivot_on_split(
index: &mut [usize],
feature: &[u16],
split_value: u16,
missing_right: bool
) -> usizeExpand 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.
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.missing_right- Should missing values go to the left, or to the right of the split value.