|
| RepMultiProcessor () |
| Constructor.
|
|
void | clear () |
|
void | add_processors_set (RepProcessorTypes type, vector< string > &signals) |
| Add processors to set.
|
|
void | add_processors_set (RepProcessorTypes type, vector< string > &signals, string init_string) |
| Add processors to set with initialization string.
|
|
void | set_required_signal_ids (MedDictionarySections &dict) |
| Required Signals ids : Fill the member vector - req_signal_ids.
|
|
void | add_virtual_signals (map< string, int > &_virtual_signals, map< string, string > &_virtual_signals_generic) const |
| Reporting back virtual signals if there are any.
|
|
void | get_required_signal_names (unordered_set< string > &signalNames) |
| Required Signals names : Fill the unordered set signalNames.
|
|
virtual void | get_required_signal_names (unordered_set< string > &signalNames, unordered_set< string > preReqSignals) |
| Append required signal names to set only if processor is actually required to produce any of preReqSignals.
|
|
void | get_required_signal_ids (unordered_set< int > &signalIds) |
| Required Signals ids : Fill the unordered set signalNames.
|
|
virtual void | get_required_signal_ids (unordered_set< int > &signalIds, unordered_set< int > preReqSignals) |
| Append required signal names to set only if processor is actually required to produce any of preReqSignals.
|
|
void | set_affected_signal_ids (MedDictionarySections &dict) |
| Affected Signals : Fill the member set aff_signal_ids.
|
|
void | register_virtual_section_name_id (MedDictionarySections &dict) |
| Register section id to section name of new virtual signals.
|
|
bool | filter (unordered_set< string > &reqSignals) |
| Check if processor (and 'sub'-processors within) should be applied according to set of required signals </summray> - Returns
- true if processor is not required and can be filtered, false otherwise
|
|
void | set_signal_ids (MedSignals &sigs) |
| Set signal-ids for all linked signals.
|
|
void | init_tables (MedDictionarySections &dict, MedSignals &sigs) |
| Init required tables : Should be implemented for inheriting classes that have such tables.
|
|
void | init_attributes () |
| Init attributes information : Should be implemented for inheriting classes that have attributes.
|
|
int | _learn (MedPidRepository &rep, MedSamples &samples, vector< RepProcessor * > &prev_processors) |
| learn processors
|
|
int | _conditional_learn (MedPidRepository &rep, MedSamples &samples, vector< RepProcessor * > &prev_processors, unordered_set< int > &neededSignalIds) |
| learn processing model on a subset of samples only if required. Apply set of preceeding processors on DynamicPidRec before learning :
|
|
int | _apply (PidDynamicRec &rec, vector< int > &time_points, vector< vector< float > > &attributes_vals) |
| Apply processors.
|
|
int | _apply_simple (PidDynamicRec &rec, vector< int > &time_points) |
|
int | _conditional_apply (PidDynamicRec &rec, vector< int > &time_points, unordered_set< int > &neededSignals, vector< vector< float > > &attributes_mat) |
| Apply processors that affect any of the needed signals.
|
|
void | fit_for_repository (MedPidRepository &rep) |
| make changes to RepProcessor according to available signals in Repository
|
|
void | dprint (const string &pref, int rp_flag) |
| debug prints
|
|
void | make_summary () |
|
void | get_required_signal_categories (unordered_map< string, vector< string > > &signal_categories_in_use) const |
| returns for each used signal it's used categories
|
|
void | print () |
| serialization
|
|
virtual int | init (void *params) |
| initialize from a params object : Should be implemented for inheriting classes that have parameters
|
|
virtual int | init (map< string, string > &mapper) |
| initialize from a map : Should be implemented for inheriting classes that have parameters
|
|
virtual void | init_defaults () |
| initialize to default values : Should be implemented for inheriting classes that have parameters
|
|
virtual void | set_signal (const string &_signalName) |
| set signal-name : Should be implemented for inheriting classes that have signalName
|
|
bool | is_signal_affected (int signalId) |
| Check if a signal is affected by processor </summray> - Returns
- true if affected, false if not
|
|
bool | is_signal_affected (string &signalName) |
|
int | learn (MedPidRepository &rep, MedSamples &samples, vector< RepProcessor * > &prev_processors) |
| learn processing model on a subset of ids. Apply set of preceeding processors on DynamicPidRec before learning
|
|
int | learn (MedPidRepository &rep) |
| learn on all pids in repository, using fake samples - works only for repProcessors that ignore sample dates
|
|
int | learn (MedPidRepository &rep, MedSamples &samples) |
| learn on subset of samples without preceesing processors
|
|
virtual int | conditional_learn (MedPidRepository &rep, MedSamples &samples, vector< RepProcessor * > &prev_processors, unordered_set< int > &neededSignalIds) |
| learn processing model on a subset of samples only if required. Apply set of preceeding processors on DynamicPidRec before learning :
|
|
int | conditional_learn (MedPidRepository &rep, MedSamples &samples, unordered_set< int > &neededSignalIds) |
| learn processing model on a subset of ids only if required without preceesing processors
|
|
int | apply (PidDynamicRec &rec, vector< int > &time_points, vector< vector< float > > &attributes_vals) |
| apply processing on a single PidDynamicRec at a set of time-points
|
|
int | conditional_apply (PidDynamicRec &rec, vector< int > &time_points, unordered_set< int > &neededSignalIds, vector< vector< float > > &attributes_vals) |
| apply processing on a single PidDynamicRec at a set of time-points only if required : if any of the signals in neededSignalIds is actually affected by processor
|
|
int | apply (PidDynamicRec &rec, MedIdSamples &samples) |
| apply processing on a single PidDynamicRec at a set of time-points given by samples
|
|
int | conditional_apply (PidDynamicRec &rec, MedIdSamples &samples, unordered_set< int > &neededSignalIds) |
| apply processing on a single PidDynamicRec at a set of time-points given by samples only if required
|
|
int | conditional_apply_without_attributes (PidDynamicRec &rec, const MedIdSamples &samples, unordered_set< int > &neededSignalIds) |
| apply processing on a single PidDynamicRec at a set of time-points given by samples only if required, not affecting attributes
|
|
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_processor_size () |
| get size of processor + processor_type
|
|
size_t | processor_serialize (unsigned char *blob) |
| seialize processor + processor_type
|
|
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 |
|
RepMultiProcessor is a repository processor which contains a vector of simpler processors that can be learned/applied in parallel.
Useful for applying same cleaners on a set of signals, for example