Medial Code Documentation
|
Public Member Functions | |
virtual void | clear () |
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 | |
virtual void | set_signal_ids (MedSignals &sigs) |
set signal-ids : Should be implemented for inheriting classes that have signalId | |
virtual void | get_required_signal_names (unordered_set< string > &signalNames) |
Append required signal names to set : parent function just uses req_signals. | |
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 : parent function just uses req_signals. | |
virtual void | set_required_signal_ids (MedDictionarySections &dict) |
Fill req_signal_ids : parent function just fills from req_signals. | |
virtual void | add_virtual_signals (map< string, int > &_virtual_signals, map< string, string > &_virtual_signals_generic) const |
rep processors CREATING virtual signals need to implement this: adding their signals to the pile | |
virtual void | get_required_signal_ids (unordered_set< int > &signalIds) |
Append required signal names to set : parent function just uses req_signals. | |
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 : parent function just uses req_signals. | |
virtual void | set_affected_signal_ids (MedDictionarySections &dict) |
Fill aff_signal_ids : parent function just fills from aff_signals. | |
bool | is_signal_affected (int signalId) |
Check if a signal is affected by processor </summray>
| |
bool | is_signal_affected (string &signalName) |
virtual void | fit_for_repository (MedPidRepository &rep) |
make changes to RepProcessor according to available signals in Repository | |
virtual void | register_virtual_section_name_id (MedDictionarySections &dict) |
Register section id to section name of new virtual signals. | |
virtual bool | filter (unordered_set< string > &reqSignals) |
Check if processor (and 'sub'-processors within) should be applied according to set of required signals </summray>
| |
virtual void | init_tables (MedDictionarySections &dict, MedSignals &sigs) |
Init required tables : Should be implemented for inheriting classes that have such tables. | |
virtual void | init_attributes () |
Init attributes information : Should be implemented for inheriting classes that have attributes. | |
virtual int | _learn (MedPidRepository &rep, MedSamples &samples, vector< RepProcessor * > &prev_processors) |
learn processing model on a subset of samples. Apply set of preceeding processors on DynamicPidRec before learning : | |
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 | 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 | |
virtual 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 : Should be implemented for all inheriting classes. | |
virtual 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 : May be implemented for inheriting classes | |
virtual int | _apply_simple (PidDynamicRec &rec, vector< int > &time_points) |
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 | |
virtual void | dprint (const string &pref, int rp_flag) |
used for debug prints, each inheriting class can overload this one to get a more precise debug print. | |
virtual void | make_summary () |
virtual 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 * | 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 void | print () |
optional printing of processor | |
![]() | |
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 |
Static Public Member Functions | |
static RepProcessor * | make_processor (string name) |
create a new repository processor from name | |
static RepProcessor * | make_processor (string type, string params) |
create a new repository processor from name and a parameters string | |
static RepProcessor * | make_processor (RepProcessorTypes type) |
create a new repository processor from type | |
static RepProcessor * | make_processor (RepProcessorTypes type, string params) |
create a new repository processor from type and a parameters string | |
static RepProcessor * | create_processor (string ¶ms) |
create a new repository processor from parameters string which contains rp_type | |
Data Fields | |
RepProcessorTypes | processor_type = REP_PROCESS_LAST |
type of repository processor | |
unordered_set< string > | req_signals |
names of signals required for processsing | |
unordered_set< int > | req_signal_ids |
ids of signals required for processing | |
unordered_set< string > | aff_signals |
names of signals affected by processing | |
unordered_set< int > | aff_signal_ids |
ids of signals affected by processing | |
bool | unconditional = false |
indicated that processor should ALWAYS be applied | |
vector< string > | attributes |
attributes generated by the processor (optional) | |
vector< pair< string, int > > | virtual_signals |
virtual signals are created only in rep processors but can be used by any rep processor that comes after or any feture generator as a regular signal. | |
vector< pair< string, string > > | virtual_signals_generic |
|
inlinevirtual |
apply processing on a single PidDynamicRec at a set of time-points : Should be implemented for all inheriting classes.
if time_points is empty, processinng is done for each version for all times
Reimplemented in RepCategoryDescenders, RepClearSignalByDiag, RepCreateRegistry, RepFilterByChannel, RepBasicOutlierCleaner, RepRuleBasedOutlierCleaner, RepNbrsOutlierCleaner, RepSimValHandler, RepPanelCompleter, RepCalcSimpleSignals, RepCombineSignals, RepSplitSignal, RepAggregationPeriod, RepBasicRangeCleaner, RepSignalRate, RepAggregateSignal, RepCreateBitSignal, RepCheckReq, RepHistoryLimit, RepNumericNoiser, RepReoderChannels, and RepMultiProcessor.
|
virtual |
apply processing on a single PidDynamicRec at a set of time-points only if required : May be implemented for inheriting classes
Reimplemented in RepMultiProcessor.
|
virtual |
learn processing model on a subset of samples only if required. Apply set of preceeding processors on DynamicPidRec before learning :
Reimplemented in RepMultiProcessor.
|
inlinevirtual |
learn processing model on a subset of samples. Apply set of preceeding processors on DynamicPidRec before learning :
Reimplemented in RepBasicOutlierCleaner, RepConfiguredOutlierCleaner, RepNbrsOutlierCleaner, RepHistoryLimit, RepNumericNoiser, RepCreateRegistry, RepMultiProcessor, RepRuleBasedOutlierCleaner, RepPanelCompleter, and RepCalcSimpleSignals.
|
inlinevirtual |
rep processors CREATING virtual signals need to implement this: adding their signals to the pile
Reimplemented in RepMultiProcessor.
|
virtual |
used for debug prints, each inheriting class can overload this one to get a more precise debug print.
rp_flag can be used to transfer verbosity levels. the default print just prints the basic type, etc. summary> prints summary of rep_processor job. optional, called after apply. for example - prints how many values were cleaned /summary>
Reimplemented in RepMultiProcessor, RepBasicOutlierCleaner, and RepRuleBasedOutlierCleaner.
|
virtual |
Check if processor (and 'sub'-processors within) should be applied according to set of required signals </summray>
Reimplemented in RepMultiProcessor.
|
inlinevirtual |
make changes to RepProcessor according to available signals in Repository
Reimplemented in RepFilterByChannel, RepMultiProcessor, RepRuleBasedOutlierCleaner, RepPanelCompleter, RepCalcSimpleSignals, RepCombineSignals, and RepBasicRangeCleaner.
|
inlinevirtual |
returns for each used signal it's used categories
Reimplemented in RepCreateRegistry, RepMultiProcessor, RepCalcSimpleSignals, RepSplitSignal, RepAggregationPeriod, and RepCreateBitSignal.
|
virtual |
Append required signal names to set : parent function just uses req_signals.
Reimplemented in RepMultiProcessor.
|
virtual |
Append required signal names to set only if processor is actually required to produce any of preReqSignals : parent function just uses req_signals.
Reimplemented in RepMultiProcessor.
|
virtual |
Append required signal names to set : parent function just uses req_signals.
Reimplemented in RepMultiProcessor.
|
virtual |
Append required signal names to set only if processor is actually required to produce any of preReqSignals : parent function just uses req_signals.
Reimplemented in RepMultiProcessor.
|
inlinevirtual |
initialize from a map : Should be implemented for inheriting classes that have parameters
Reimplemented from SerializableObject.
Reimplemented in RepCategoryDescenders, RepClearSignalByDiag, RepCreateRegistry, RepFilterByChannel, RepBasicOutlierCleaner, RepConfiguredOutlierCleaner, RepRuleBasedOutlierCleaner, RepNbrsOutlierCleaner, RepSimValHandler, RepPanelCompleter, RepCalcSimpleSignals, RepCombineSignals, RepSplitSignal, RepAggregationPeriod, RepBasicRangeCleaner, RepSignalRate, RepAggregateSignal, RepCreateBitSignal, RepCheckReq, RepHistoryLimit, RepNumericNoiser, and RepReoderChannels.
|
inlinevirtual |
initialize from a params object : Should be implemented for inheriting classes that have parameters
Reimplemented in RepBasicOutlierCleaner, RepRuleBasedOutlierCleaner, and RepNbrsOutlierCleaner.
|
inlinevirtual |
Init attributes information : Should be implemented for inheriting classes that have attributes.
Reimplemented in RepMultiProcessor, RepBasicOutlierCleaner, RepRuleBasedOutlierCleaner, RepNbrsOutlierCleaner, RepSimValHandler, and RepCheckReq.
|
inlinevirtual |
initialize to default values : Should be implemented for inheriting classes that have parameters
Reimplemented in RepBasicOutlierCleaner, RepConfiguredOutlierCleaner, RepRuleBasedOutlierCleaner, RepNbrsOutlierCleaner, RepPanelCompleter, RepHistoryLimit, and RepNumericNoiser.
|
inlinevirtual |
Init required tables : Should be implemented for inheriting classes that have such tables.
Reimplemented in RepCategoryDescenders, RepClearSignalByDiag, RepCreateRegistry, RepFilterByChannel, RepMultiProcessor, RepRuleBasedOutlierCleaner, RepSimValHandler, RepPanelCompleter, RepCalcSimpleSignals, RepCombineSignals, RepSplitSignal, RepAggregationPeriod, RepBasicRangeCleaner, RepSignalRate, RepAggregateSignal, RepCreateBitSignal, and RepCheckReq.
|
virtual |
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)
Reimplemented from SerializableObject.
|
inlinevirtual |
optional printing of processor
Reimplemented in RepFilterByChannel, RepMultiProcessor, RepBasicOutlierCleaner, RepPanelCompleter, RepCalcSimpleSignals, RepCombineSignals, RepSplitSignal, RepAggregationPeriod, RepSignalRate, RepAggregateSignal, and RepReoderChannels.
|
inlinevirtual |
Register section id to section name of new virtual signals.
Reimplemented in RepFilterByChannel, RepMultiProcessor, RepCalcSimpleSignals, RepCombineSignals, RepSplitSignal, RepBasicRangeCleaner, RepSignalRate, RepAggregateSignal, and RepCreateBitSignal.
|
virtual |
Fill aff_signal_ids : parent function just fills from aff_signals.
Reimplemented in RepClearSignalByDiag, RepFilterByChannel, RepMultiProcessor, RepCombineSignals, RepSplitSignal, RepSignalRate, RepAggregateSignal, and RepCreateBitSignal.
|
virtual |
Fill req_signal_ids : parent function just fills from req_signals.
Reimplemented in RepClearSignalByDiag, RepFilterByChannel, RepMultiProcessor, RepCombineSignals, RepSplitSignal, RepSignalRate, RepAggregateSignal, and RepCreateBitSignal.
|
inlinevirtual |
set signal-name : Should be implemented for inheriting classes that have signalName
Reimplemented in RepCategoryDescenders, RepBasicOutlierCleaner, RepNbrsOutlierCleaner, RepSimValHandler, and RepReoderChannels.
|
inlinevirtual |
set signal-ids : Should be implemented for inheriting classes that have signalId
Reimplemented in RepCategoryDescenders, RepMultiProcessor, RepBasicOutlierCleaner, RepConfiguredOutlierCleaner, RepRuleBasedOutlierCleaner, RepNbrsOutlierCleaner, RepSimValHandler, RepPanelCompleter, RepCheckReq, RepHistoryLimit, RepNumericNoiser, and RepReoderChannels.
vector<pair<string, int> > RepProcessor::virtual_signals |
virtual signals are created only in rep processors but can be used by any rep processor that comes after or any feture generator as a regular signal.
a virtual signal can be defined as one only once - in the rep processor that actually creates it. The other rep processors and feature generators using it are simply blind to the fact that it is virtual and use it by name as a regular signal. list of all virtual signals CREATED by this rep processor