|
Medial Code Documentation
|
A class which fetches the samples in bootstrap manner in memort way. More...
#include <bootstrap.h>
Public Member Functions | |
| Mem_Iterator (const vector< int > &pids, const vector< int > &cohort_indexes, float p_sample_ratio, int p_sample_per_pid, int seed) | |
| The Ctor. | |
| void | fetch_selection (vector< int > &indexes) const |
| Inline function to fetch indexes. | |
| void | fetch_selection_external (vector< int > &indexes) const |
| external function to fetch indexes | |
| void | fetch_selection (mt19937 &rd_gen, vector< int > &indexes) const |
| Inline function to fetch indexes - for multi thread - provide random generator. | |
| void | fetch_selection_external (mt19937 &rd_gen, vector< int > &indexes) const |
| external function to fetch indexes - for multi thread - provide random generator | |
A class which fetches the samples in bootstrap manner in memort way.
The object selects indexes in each bootstrap fetches the samples in randomization by index vector in the future - choose dynamically the faster Iterator to use Lazy_Iterator or Mem_Iterator
| Mem_Iterator::Mem_Iterator | ( | const vector< int > & | pids, |
| const vector< int > & | cohort_indexes, | ||
| float | p_sample_ratio, | ||
| int | p_sample_per_pid, | ||
| int | seed | ||
| ) |
The Ctor.
| pids | a reference to pids vector - without selection |
| cohort_indexes | a reference to selected indexes from cohort filter to bootstrap indexes from |
| p_sample_ratio | a sample ratio parameter for the bootstrap (0-1] |
| p_sample_per_pid | a sample count per patient (num of threads or the bootstrap loop count). |
| seed | if 0 will use random device to select seed for randomization |