fn choose_best_split_for_feature(
	feature_index: usize,
	binning_instructions: &BinningInstruction,
	bin_stats_for_feature: &[BinStatsEntry],
	n_examples: usize,
	sum_gradients: f64,
	sum_hessians: f64,
	train_options: &TrainOptions,
) -> Option<ChooseBestSplitForFeatureOutput> {
	match binning_instructions {
		BinningInstruction::Number { .. } => choose_best_split_for_continuous_feature(
			feature_index,
			binning_instructions,
			bin_stats_for_feature,
			n_examples,
			sum_gradients,
			sum_hessians,
			train_options,
		),
		BinningInstruction::Enum { .. } => choose_best_split_for_discrete_feature(
			feature_index,
			binning_instructions,
			bin_stats_for_feature,
			n_examples,
			sum_gradients,
			sum_hessians,
			train_options,
		),
	}
}
/// Choose the best split for a feature by choosing a continuous split for number features and a discrete split for enum features.
Choose the best split for a feature by choosing a continuous split for number features and a discrete split for enum features.
Choose the best split for a feature by choosing a continuous split for number features and a discrete split for enum features .
fn choose_best_split_for_feature(
	feature_index: usize,
	binning_instructions: &BinningInstruction,
	bin_stats_for_feature: &[BinStatsEntry],
	n_examples: usize,
	sum_gradients: f64,
	sum_hessians: f64,
	train_options: &TrainOptions,
) -> Option<ChooseBestSplitForFeatureOutput> {
	match binning_instructions {
		BinningInstruction::Number { .. } => choose_best_split_for_continuous_feature(
			feature_index,
			binning_instructions,
			bin_stats_for_feature,
			n_examples,
			sum_gradients,
			sum_hessians,
			train_options,
		),
		BinningInstruction::Enum { .. } => choose_best_split_for_discrete_feature(
			feature_index,
			binning_instructions,
			bin_stats_for_feature,
			n_examples,
			sum_gradients,
			sum_hessians,
			train_options,
		),
	}
}
fn choose_best_split_for_feature ( feature_index : usize , binning_instructions : & BinningInstruction , bin_stats_for_feature : & [ BinStatsEntry ] , n_examples : usize , sum_gradients : f64 , sum_hessians : f64 , train_options : & TrainOptions , ) -> Option < ChooseBestSplitForFeatureOutput > { match binning_instructions { BinningInstruction :: Number { .. } => choose_best_split_for_continuous_feature ( feature_index , binning_instructions , bin_stats_for_feature , n_examples , sum_gradients , sum_hessians , train_options , ) , BinningInstruction :: Enum { .. } => choose_best_split_for_discrete_feature ( feature_index , binning_instructions , bin_stats_for_feature , n_examples , sum_gradients , sum_hessians , train_options , ) , } }
Choose the best split for a feature by choosing a continuous split for number features and a discrete split for enum features.
Choose the best split for a feature by choosing a continuous split for number features and a discrete split for enum features .
feature_index
usize
binning_instructions
&BinningInstruction
bin_stats_for_feature
&[BinStatsEntry]
n_examples
usize
sum_gradients
f64
sum_hessians
f64
train_options
&TrainOptions