fsml_sample_k Interface

public interface fsml_sample_k

Subroutine for creating k ~equal-sized subsamples of a rank-1 array. The array indices are shuffled using the Fisher–Yates algorithm. Then, k logical masks are constructed for the k subsamples.

Calls

interface~~fsml_sample_k~~CallsGraph interface~fsml_sample_k fsml_sample_k proc~s_dat_sample_k s_dat_sample_k interface~fsml_sample_k->proc~s_dat_sample_k proc~s_err_print s_err_print proc~s_dat_sample_k->proc~s_err_print

Module Procedures

public subroutine s_dat_sample_k(m, k, mask)

Subroutine for creating k ~equal-sized samples of a rank-1 array. The array indices are shuffled using the Fisher–Yates algorithm. Then, k logical masks are constructed. In each mask, the indices belonging to one of the k folds (not part of the sample) are set to .false. and the remaining indices are set to .true., making the masks directly suitable for k-fold cross-validation.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=i4), intent(in) :: m

size of population (array)

integer(kind=i4), intent(in) :: k

number of subsample sets

logical, intent(out) :: mask(m,k)

index mask for sampled data