fn train_early_stopping_split<'features, 'labels>(
	features: TableView<'features>,
	labels: TableColumnView<'labels>,
	early_stopping_fraction: f32,
) -> (
	TableView<'features>,
	TableColumnView<'labels>,
	TableView<'features>,
	TableColumnView<'labels>,
) {
	let split_index = (early_stopping_fraction * labels.len().to_f32().unwrap())
		.to_usize()
		.unwrap();
	let (features_early_stopping, features_train) = features.split_at_row(split_index);
	let (labels_early_stopping, labels_train) = labels.split_at_row(split_index);
	(
		features_train,
		labels_train,
		features_early_stopping,
		labels_early_stopping,
	)
}
/// Split the feature and labels into train and early stopping datasets, where the early stopping dataset will have `early_stopping_fraction * features.nrows()` rows.
Split the feature and labels into train and early stopping datasets, where the early stopping dataset will have `early_stopping_fraction * features.nrows()` rows.
Split the feature and labels into train and early stopping datasets where the early stopping dataset will have ` early_stopping_fraction * features . nrows () ` rows .
fn train_early_stopping_split<'features, 'labels>(
	features: TableView<'features>,
	labels: TableColumnView<'labels>,
	early_stopping_fraction: f32,
) -> (
	TableView<'features>,
	TableColumnView<'labels>,
	TableView<'features>,
	TableColumnView<'labels>,
) {
	let split_index = (early_stopping_fraction * labels.len().to_f32().unwrap())
		.to_usize()
		.unwrap();
	let (features_early_stopping, features_train) = features.split_at_row(split_index);
	let (labels_early_stopping, labels_train) = labels.split_at_row(split_index);
	(
		features_train,
		labels_train,
		features_early_stopping,
		labels_early_stopping,
	)
}
fn train_early_stopping_split < ' features , ' labels > ( features : TableView < ' features > , labels : TableColumnView < ' labels > , early_stopping_fraction : f32 , ) -> ( TableView < ' features > , TableColumnView < ' labels > , TableView < ' features > , TableColumnView < ' labels > , ) { let split_index = ( early_stopping_fraction * labels . len ( ) . to_f32 ( ) . unwrap ( ) ) . to_usize ( ) . unwrap ( ) ; let ( features_early_stopping , features_train ) = features . split_at_row ( split_index ) ; let ( labels_early_stopping , labels_train ) = labels . split_at_row ( split_index ) ; ( features_train , labels_train , features_early_stopping , labels_early_stopping , ) }
Split the feature and labels into train and early stopping datasets, where the early stopping dataset will have `early_stopping_fraction * features.nrows()` rows.
Split the feature and labels into train and early stopping datasets where the early stopping dataset will have ` early_stopping_fraction * features . nrows () ` rows .
features
TableView<'features>
labels
TableColumnView<'labels>
early_stopping_fraction
f32