|
void | set (string &_signalName, RangeFeatureTypes _type) |
|
void | set (string &_signalName, RangeFeatureTypes _type, int _time_win_from, int _time_win_to) |
|
void | set_names () |
|
void | get_required_signal_categories (unordered_map< string, vector< string > > &signal_categories_in_use) const |
| returns for each used signal it's used categories
|
|
int | init (map< string, string > &mapper) |
| The parsed fields from init command.
|
|
void | init_defaults () |
|
RangeFeatureTypes | name_to_type (const string &name) |
| please reffer to RangeFeatureTypes to understand the options
|
|
void | init_tables (MedDictionarySections &dict) |
|
virtual void | copy (FeatureGenerator *generator) |
|
int | _learn (MedPidRepository &rep, const MedSamples &samples, vector< RepProcessor * > processors) |
|
int | _generate (PidDynamicRec &rec, MedFeatures &features, int index, int num, vector< float * > &_p_data) |
|
float | get_value (PidDynamicRec &rec, int index, int date) |
|
void | set_signal_ids (MedSignals &sigs) |
|
virtual void | prepare (MedFeatures &features, MedPidRepository &rep, MedSamples &samples) |
|
virtual void | get_p_data (MedFeatures &features, vector< float * > &_p_data) |
|
void | get_p_data (MedFeatures &features) |
|
virtual void | clear () |
|
void | get_required_signal_names (unordered_set< string > &signalNames) |
|
virtual void | set_required_signal_ids (MedDictionarySections &dict) |
|
void | get_required_signal_ids (unordered_set< int > &signalIds) |
|
virtual void | get_generated_features (unordered_set< string > &names_list) |
|
virtual void | fit_for_repository (MedPidRepository &rep) |
| Prepartion and adjustment for model based on repository.
|
|
int | learn (MedPidRepository &rep, const MedSamples &samples, vector< RepProcessor * > processors) |
|
int | learn (MedPidRepository &rep, const MedSamples &samples) |
|
int | _generate (PidDynamicRec &in_rep, MedFeatures &features, int index, int num) |
|
int | generate (PidDynamicRec &in_rep, MedFeatures &features, int index, int num) |
|
int | generate (PidDynamicRec &in_rep, MedFeatures &features) |
|
int | generate (MedPidRepository &rep, int id, MedFeatures &features) |
|
int | generate (MedPidRepository &rep, int id, MedFeatures &features, int index, int num) |
|
virtual int | _generate (MedFeatures &features) |
|
int | generate (MedFeatures &features) |
|
virtual int | init (void *generator_params) |
|
virtual int | nfeatures () |
|
virtual int | filter_features (unordered_set< string > &validFeatures) |
| summary> prints summary of generator job.
|
|
virtual void | make_summary () |
|
void * | new_polymorphic (string derived_class_name) |
| for polymorphic classes that want to be able to serialize/deserialize a pointer * to the derived class given its type one needs to implement this function to return a new to the derived class given its type (as in my_type)
|
|
size_t | get_generator_size () |
|
size_t | generator_serialize (unsigned char *blob) |
|
virtual void | print () |
|
virtual void | dprint (const string &pref, int fg_flag) |
|
virtual int | version () const |
| Relevant for serializations.
|
|
virtual string | my_class_name () const |
| For better handling of serializations it is highly recommended that each SerializableObject inheriting class will implement the next method.
|
|
virtual void | serialized_fields_name (vector< string > &field_names) const |
| The names of the serialized fields.
|
|
virtual void | pre_serialization () |
|
virtual void | post_deserialization () |
|
virtual size_t | get_size () |
| Gets bytes sizes for serializations.
|
|
virtual size_t | serialize (unsigned char *blob) |
| Serialiazing object to blob memory. return number ob bytes wrote to memory.
|
|
virtual size_t | deserialize (unsigned char *blob) |
| Deserialiazing blob to object. returns number of bytes read.
|
|
size_t | serialize_vec (vector< unsigned char > &blob) |
|
size_t | deserialize_vec (vector< unsigned char > &blob) |
|
virtual size_t | serialize (vector< unsigned char > &blob) |
|
virtual size_t | deserialize (vector< unsigned char > &blob) |
|
virtual int | read_from_file (const string &fname) |
| read and deserialize model
|
|
virtual int | write_to_file (const string &fname) |
| serialize model and write to file
|
|
virtual int | read_from_file_unsafe (const string &fname) |
| read and deserialize model without checking version number - unsafe read
|
|
int | init_from_string (string init_string) |
| Init from string.
|
|
int | init_params_from_file (string init_file) |
|
int | init_param_from_file (string file_str, string ¶m) |
|
int | update_from_string (const string &init_string) |
|
virtual int | update (map< string, string > &map) |
| Virtual to update object from parsed fields.
|
|
virtual string | object_json () const |
|
|
string | signalName |
| Signal to consider.
|
|
int | signalId |
|
vector< string > | sets |
| FTR_RANGE_EVER checks if the signal ever was in one of these sets/defs from the respective dict.
|
|
RangeFeatureTypes | type |
| Type of comorbidity index to generate.
|
|
int | win_from = 0 |
| time window for feature: from is the minimal time before prediciton time
|
|
int | win_to = 360000 |
| time window for feature: to is the maximal time before prediciton time
|
|
int | time_unit_win = MedTime::Undefined |
| the time unit in which the windows are given. Default: Undefined
|
|
int | time_unit_sig = MedTime::Undefined |
| the time init in which the signal is given. (set correctly from Repository in learn and Generate)
|
|
int | val_channel = 0 |
| n >= 0 : use val channel n , default : 0.
|
|
int | check_first = 1 |
| if 1 choose first occurance of check_val otherwise choose last
|
|
float | div_factor = 1.0f |
|
vector< char > | lut |
| dividing by this number in time_covered option
|
|
int | recurrence_delta = 30 * 24 * 60 |
| maximum time for a subsequent range signal to be considered a recurrence in in window time units
|
|
int | min_range_time = -1 |
| if different from -1, the minimum length for a range to be considered valid in window time units (else not checked)
|
|
int | N_th = 0 |
| the index of the N-th range in order to consider in the last_nth_time_len option
|
|
int | zero_missing = 0 |
| in some cases we may want to get 0 instead of missing values
|
|
int | strict_times = 0 |
| if on , will ignore cases in which the second time channel is after the prediction time
|
|
int | conditional_channel = -1 |
| in some cases (currently last_nth_len, and time_covered) we allow doing the calculation only on ranges passing the condition of being included in sets in this channel
|
|
bool | regex_on_sets = false |
| if on , regex is applied on .*sets[i].* and aggregated.
|
|
int | first_evidence_time_channel = 1 |
| sometimes we have a different time channel stating WHEN the range started. We are strict and use the default of last time in range, but sometimes it is not like that and this can allow calculating if we are now IN the range, and how LONG since the start.
|
|
string | timeRangeSignalName = "" |
|
int | timeRangeSignalId |
|
TimeRangeTypes | timeRangeType = TIME_RANGE_CURRENT |
|
int | time_unit_range_sig = MedTime::Undefined |
| the time unit in which the range signal is given. (set correctly from Repository in learn and _generate)
|
|
FeatureGeneratorTypes | generator_type = FTR_GEN_LAST |
| Type.
|
|
vector< string > | names |
| Feature name.
|
|
int | learn_nthreads = 16 |
|
int | pred_nthreads = 16 |
|
float | missing_val = (float)MED_MAT_MISSING_VALUE |
| Missing value.
|
|
vector< string > | tags |
| Tags - for defining labels or groups. may be used later for filtering for example.
|
|
int | iGenerateWeights = 0 |
| Feature/Weights generator.
|
|
vector< float * > | p_data |
|
vector< string > | req_signals |
|
vector< int > | req_signal_ids |
|
int | serial_id |
|
RangeFeatGenerator : Generate features for a time range with value signal (for example drug)