get_stratified_train_test_split {aifeducation}R Documentation

Create a stratified random sample

Description

This function creates a stratified random sample.The difference to get_train_test_split is that this function does not require text embeddings and does not split the text embeddings into a train and validation sample.

Usage

get_stratified_train_test_split(targets, val_size = 0.25)

Arguments

targets

Named vector containing the labels/categories for each case.

val_size

double Value between 0 and 1 indicating how many cases of each label/category should be part of the validation sample.

Value

list which contains the names of the cases belonging to the train sample and to the validation sample.

See Also

Other Auxiliary Functions: array_to_matrix(), calc_standard_classification_measures(), check_embedding_models(), clean_pytorch_log_transformers(), create_iota2_mean_object(), create_synthetic_units(), generate_id(), get_coder_metrics(), get_folds(), get_n_chunks(), get_synthetic_cases(), get_train_test_split(), is.null_or_na(), matrix_to_array_c(), split_labeled_unlabeled(), summarize_tracked_sustainability(), to_categorical_c()


[Package aifeducation version 0.3.3 Index]