Medial Code Documentation
Loading...
Searching...
No Matches
MedSamplingHelper.h
1#ifndef __MED_SAMPLING_HELPER__
2#define __MED_SAMPLING_HELPER__
3
4#include "FilterParams.h"
5#include "MedRegistryRecord.h"
6#include <MedProcessTools/MedProcessTools/MedSamples.h>
7
11namespace medial {
15 namespace sampling {
27 bool in_time_window_simple(int pred_date, int start_time, int end_time, bool reverse, TimeWindowMode mode);
28
44 bool in_time_window(int pred_date, const MedRegistryRecord *r_outcome, const vector<const MedRegistryRecord *> &r_censor,
45 int time_from, int time_to, int censor_time_from, int censor_time_to,
46 const TimeWindowMode mode[2], const TimeWindowMode mode_prediction[2]);
47
64 bool in_time_window(int pred_date, const MedRegistryRecord *r_outcome, const vector<const MedRegistryRecord *> &r_censor,
65 int time_from, int time_to, int censor_time_from, int censor_time_to, const TimeWindowInteraction &mode_outcome, const TimeWindowInteraction &mode_censoring,
66 bool filter_no_censor = true);
67
84 void get_label_for_sample(int pred_time, const vector<const MedRegistryRecord *> &pid_records
85 , const vector<const MedRegistryRecord *> &r_censor, int time_from, int time_to, int censor_time_from, int censor_time_to,
86 const TimeWindowInteraction &mode_outcome, const TimeWindowInteraction &mode_censoring,
87 ConflictMode conflict_mode, vector<MedSample> &idSamples,
88 int &no_rule_found, int &conflict_count, int &done_count, bool treat_0_class_as_other_classes, bool filter_no_censor = true, bool show_conflicts = false);
89 }
90}
91
92#endif // !__MED_SAMPLING_HELPER__
93
TimeWindowMode
Definition MedEnums.h:25
ConflictMode
Definition MedEnums.h:12
A class which represnt a registry record of patient in time range from start_date to end_date It has ...
Definition MedRegistryRecord.h:11
A warpper class for initializing rules for time window interaction.
Definition LabelParams.h:14
bool in_time_window_simple(int pred_date, int start_time, int end_time, bool reverse, TimeWindowMode mode)
checks for time range intersection
Definition MedSamplingHelper.cpp:8
void get_label_for_sample(int pred_time, const vector< const MedRegistryRecord * > &pid_records, const vector< const MedRegistryRecord * > &r_censor, int time_from, int time_to, int censor_time_from, int censor_time_to, const TimeWindowInteraction &mode_outcome, const TimeWindowInteraction &mode_censoring, ConflictMode conflict_mode, vector< MedSample > &idSamples, int &no_rule_found, int &conflict_count, int &done_count, bool treat_0_class_as_other_classes, bool filter_no_censor=true, bool show_conflicts=false)
checks for time range intersection
Definition MedSamplingHelper.cpp:138
bool in_time_window(int pred_date, const MedRegistryRecord *r_outcome, const vector< const MedRegistryRecord * > &r_censor, int time_from, int time_to, int censor_time_from, int censor_time_to, const TimeWindowMode mode[2], const TimeWindowMode mode_prediction[2])
checks for time range intersection
Definition MedSamplingHelper.cpp:37
medial namespace for function
Definition InfraMed.h:667