Reels
|
Namespaces | |
namespace | reels |
The namespace including everything to simplify using Reels in a c++ application,. | |
Macros | |
#define | MURMUR_SEED 76493 |
Just a 5 digit prime. More... | |
Typedefs | |
typedef Events * | pEvents |
typedef Clients * | pClients |
typedef Clips * | pClips |
typedef Targets * | pTargets |
typedef TimesToTarget * | pIterTimes |
typedef std::map< int, pEvents > | EventsServer |
typedef std::map< int, pClients > | ClientsServer |
typedef std::map< int, pClips > | ClipsServer |
typedef std::map< int, pTargets > | TargetsServer |
typedef std::map< int, pIterTimes > | IterTimesServer |
typedef std::map< int, pBinaryImage > | BinaryImageServer |
Functions | |
uint64_t | reels::MurmurHash64A (const void *key, int len) |
MurmurHash2, 64-bit versions, by Austin Appleby. More... | |
bool | reels::image_put (pBinaryImage p_bi, void *p_data, int size) |
A function to push arbitrary raw data into a BinaryImage. More... | |
bool | reels::image_get (pBinaryImage p_bi, int &c_block, int &c_ofs, void *p_data, int size) |
A function to get an arbitrary raw data block from a BinaryImage. More... | |
bool | reels::compare_optimize_eval (const OptimizeEvalItem a, const OptimizeEvalItem b) |
Compare two OptimizeEvalItem structures for sorting. More... | |
bool | reels::compare_score_item (const CodeScoreItem a, const CodeScoreItem b) |
Compare two CodeScoreItem structures for sorting. More... | |
bool | destroy_binary_image_iterator (int image_id) |
Destroy an iterator for a binary image(returned by save_as_binary_image()). More... | |
char * | image_block_as_string (uint8_t *p_in) |
Serializes a complete binary block (fixed size) as a base-64 string which is Python compatible. More... | |
char * | image_block_as_string (ImageBlock &blk) |
Serializes a complete binary block (fixed size) as a base-64 string which is Python compatible. More... | |
bool | string_as_image_block (ImageBlock &blk, char *p_in) |
Deserializes a base-64 string which is Python compatible as a complete binary ImageBlock (fixed size). More... | |
int | new_events () |
Create a new Events object that can be used via the Python interface. More... | |
bool | destroy_events (int id) |
Destroy a Events object that was used via the Python interface. More... | |
bool | events_insert_row (int id, char *p_e, char *p_d, double w) |
Process a row from a transaction file in an Events object stored by the EventsServer. More... | |
bool | events_define_event (int id, char *p_e, char *p_d, double w, int code) |
Define events explicitly in an Events object stored by the EventsServer. More... | |
char * | events_optimize_events (int id, int id_clips, int id_targets, int num_steps, int codes_per_step, double threshold, char *force_include, char *force_exclude, char *x_form, char *agg, double p, int depth, int as_states, double exp_decay, double lower_bound_p, bool log_lift) |
Events optimizer. More... | |
bool | events_load_block (int id, char *p_block) |
Pushes raw image blocks into an initially empty Events object and finally creates it already populated with the binary image. More... | |
int | events_save (int id) |
Saves an Events object as a BinaryImage. More... | |
bool | parse_bin_event_pt (char *line, BinEventPt &ev) |
char * | events_describe_next_event (int id, char *prev_event) |
Describes the internal representation of an event. (Iterate through all.) More... | |
bool | events_set_max_num_events (int id, int max_events) |
Sets the public property max_num_events in an Events object stored by the EventsServer. More... | |
bool | events_set_store_strings (int id, bool store) |
Sets the public property store_strings in an Events object stored by the EventsServer. More... | |
int | events_num_events (int id) |
Return the number of events stored in an Events object stored by the EventsServer. More... | |
int | new_clients () |
Create a new Clients object that can be used via the Python interface. More... | |
bool | destroy_clients (int id) |
Destroy a Clients object that was used via the Python interface. More... | |
char * | clients_hash_client_id (int id, char *p_cli) |
Return the hash of a client ID as a decimal string. More... | |
bool | clients_add_client_id (int id, char *p_cli) |
Add a client ID to a Clients object stored by the ClientsServer only if new. More... | |
char * | clients_hash_by_index (int id, int idx) |
Return the hash of a stored client ID by index as a decimal string. More... | |
int | clients_num_clients (int id) |
Return the number of clients stored in an Clients object stored by the ClientsServer. More... | |
bool | clients_load_block (int id, char *p_block) |
Pushes raw image blocks into an initially empty Clients object and finally creates it already populated with the binary image. More... | |
int | clients_save (int id) |
Saves an Clients object as a BinaryImage. More... | |
int | new_clips (int id_clients, int id_events) |
Create a new Clips object that can be used via the Python interface. More... | |
bool | destroy_clips (int id) |
Destroy a Clips object that was used via the Python interface. More... | |
bool | clips_set_time_format (int id, char *fmt) |
Sets the public property time_format to simplify the python interface in a Clips object stored by the ClipsServer. More... | |
bool | clips_scan_event (int id, char *p_e, char *p_d, double w, char *p_c, char *p_t) |
Process a row from a transaction file, to add the event to the client's timeline in a Clips object stored by the ClipsServer. More... | |
char * | clips_hash_by_previous (int id, char *prev_hash) |
Return the hash of the client ID of a clip defined the previous value or zero for the first one as a decimal string. More... | |
bool | clips_load_block (int id, char *p_block) |
Pushes raw image blocks into an initially empty Clips object and finally creates it already populated with the binary image. More... | |
int | clips_save (int id) |
Saves an Clips object as a BinaryImage. More... | |
char * | clips_describe_clip (int id, char *client_id) |
Describes the internal representation of a clip. More... | |
int | clips_num_clips (int id) |
Return the number of clips stored in the internal ClipMap in a Clips object stored by the ClipsServer. More... | |
int | clips_num_events (int id) |
Return the number of events stored in the internal ClipMap in a Clips object stored by the ClipsServer. More... | |
char * | clips_test_sequence (int seq_num, bool target) |
Generates a constant sequence of codes for testing the Event Optimizer. More... | |
int | new_targets (int id_clips) |
Create a new Targets object that can be used via the Python interface. More... | |
bool | destroy_targets (int id) |
Destroy a Targets object that was used via the Python interface. More... | |
bool | targets_set_time_format (int id, char *fmt) |
Sets the public property time_format to simplify the python interface in a Targets object stored by the TargetsServer. More... | |
bool | targets_insert_target (int id, char *p_c, char *p_t) |
Utility to fill the internal TargetMap target in a Targets object stored by the TargetsServer. More... | |
bool | targets_fit (int id, char *x_form, char *agg, double p, int depth, int as_states) |
Fit the prediction model in a Targets object stored by the TargetsServer. More... | |
int | targets_predict_clients (int id, int id_clients) |
Predict time to target for all the clients in a given Clients object whose clips have been used to fit the model in a Targets object stored by the TargetsServer. More... | |
int | targets_predict_clips (int id, int id_clips) |
Predict time to target for a set of clients whose clips are given in a ClipMap in a Targets object stored by the TargetsServer. More... | |
bool | targets_load_block (int id, char *p_block) |
Pushes raw image blocks into an initially empty Targets object and finally creates it already populated with the binary image. More... | |
int | targets_save (int id) |
Saves an Targets object as a BinaryImage. More... | |
int | targets_num_targets (int id) |
Returns the number of target points stored in the internal target variable. More... | |
int | targets_tree_node_idx (int id, int parent_idx, int code) |
Returns the index of a tree node by parent node and code. More... | |
char * | targets_tree_node_children (int id, int idx) |
Lists the children of a tree node. More... | |
char * | targets_describe_tree_node (int id, int idx) |
Describes the internal representation of a tree node. More... | |
char * | targets_describe_tree (int id) |
Describes some statistics of a fitted tree inside a Targets object. More... | |
int | size_result_iterator (int iter_id) |
Return the number of unread items in an iterator returned by predict(). More... | |
double | next_result_iterator (int iter_id) |
Return the first unread item in an iterator returned by predict(). More... | |
void | destroy_result_iterator (int iter_id) |
Destroy an iterator returned by predict(). More... | |
int | size_binary_image_iterator (int image_id) |
Return the number of unread binary images blocks in an iterator returned by a save_as_binary_image() call. More... | |
char * | next_binary_image_iterator (int image_id) |
Return the first unread binary images block in an iterator returned by a save_as_binary_image() call. More... | |
Variables | |
Logger | reels::REELS_logger = {} |
Used to output stats of Events::get_top_codes added by the Python API in events_optimize_events() More... | |
int | events_num = 0 |
int | clients_num = 0 |
int | clips_num = 0 |
int | targets_num = 0 |
int | it_times_num = 0 |
EventsServer | events = {} |
ClientsServer | clients = {} |
ClipsServer | clips = {} |
TargetsServer | targets = {} |
IterTimesServer | it_times = {} |
BinaryImageServer | image = {} |
char | answer_buffer [8192] |
char | answer_block [8208] |
char | b64chars [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" |
uint8_t | b64inverse [256] = {0} |
#define MURMUR_SEED 76493 |
Just a 5 digit prime.
typedef std::map<int, pBinaryImage> BinaryImageServer |
typedef std::map<int, pClients> ClientsServer |
typedef std::map<int, pClips> ClipsServer |
typedef std::map<int, pEvents> EventsServer |
typedef std::map<int, pIterTimes> IterTimesServer |
typedef TimesToTarget* pIterTimes |
typedef std::map<int, pTargets> TargetsServer |
bool clients_add_client_id | ( | int | id, |
char * | p_cli | ||
) |
Add a client ID to a Clients object stored by the ClientsServer only if new.
id | The id returned by a previous new_clients() call. |
p_cli | The "client". A string representing "the actor". |
char * clients_hash_by_index | ( | int | id, |
int | idx | ||
) |
Return the hash of a stored client ID by index as a decimal string.
id | The id returned by a previous new_clients() call. |
idx | The index of the client in the container (In range 0..size() - 1). |
char * clients_hash_client_id | ( | int | id, |
char * | p_cli | ||
) |
Return the hash of a client ID as a decimal string.
id | The id returned by a previous new_clients() call. |
p_cli | The "client". A string representing "the actor". |
bool clients_load_block | ( | int | id, |
char * | p_block | ||
) |
Pushes raw image blocks into an initially empty Clients object and finally creates it already populated with the binary image.
id | The id returned by a previous new_clients() call. The object must be empty (never called). |
p_block | If non-empty, a block in the right order making a binary image obtained for a previous clients_save() call. If empty, an order to .load() the Clients object and destroyed the previously stored blocks. |
int clients_num_clients | ( | int | id | ) |
Return the number of clients stored in an Clients object stored by the ClientsServer.
id | The id returned by a previous new_clients() call. |
int clients_save | ( | int | id | ) |
Saves an Clients object as a BinaryImage.
id | The id returned by a previous new_clients() call. |
char * clips_describe_clip | ( | int | id, |
char * | client_id | ||
) |
Describes the internal representation of a clip.
id | The id returned by a previous new_clips() call. |
client_id | The hash identifying a client or the client id. |
char * clips_hash_by_previous | ( | int | id, |
char * | prev_hash | ||
) |
Return the hash of the client ID of a clip defined the previous value or zero for the first one as a decimal string.
id | The id returned by a previous new_clients() call. |
prev_hash | The previous hash returned by this function to use as an iterator. |
bool clips_load_block | ( | int | id, |
char * | p_block | ||
) |
Pushes raw image blocks into an initially empty Clips object and finally creates it already populated with the binary image.
id | The id returned by a previous new_clips() call. The object must be empty (never called). |
p_block | If non-empty, a block in the right order making a binary image obtained for a previous clips_save() call. If empty, an order to .load() the Clips object and destroyed the previously stored blocks. |
int clips_num_clips | ( | int | id | ) |
Return the number of clips stored in the internal ClipMap in a Clips object stored by the ClipsServer.
id | The id returned by a previous new_clips() call. |
int clips_num_events | ( | int | id | ) |
Return the number of events stored in the internal ClipMap in a Clips object stored by the ClipsServer.
id | The id returned by a previous new_clips() call. |
int clips_save | ( | int | id | ) |
Saves an Clips object as a BinaryImage.
id | The id returned by a previous new_clips() call. |
bool clips_scan_event | ( | int | id, |
char * | p_e, | ||
char * | p_d, | ||
double | w, | ||
char * | p_c, | ||
char * | p_t | ||
) |
Process a row from a transaction file, to add the event to the client's timeline in a Clips object stored by the ClipsServer.
id | The id returned by a previous new_clips() call. |
p_e | The "emitter". A C/Python string representing "owner of event". |
p_d | The "description". A C/Python string representing "the event". |
w | The "weight". A double representing a weight of the event. |
p_c | The "client". A C/Python string representing "the actor". |
p_t | The "time". A timestamp of the event as a C/Python string. (The format is given via set_time_format().) |
bool clips_set_time_format | ( | int | id, |
char * | fmt | ||
) |
Sets the public property time_format to simplify the python interface in a Clips object stored by the ClipsServer.
id | The id returned by a previous new_clips() call. |
fmt | The time format in standard calendar time format http://www.gnu.org/software/libc/manual/html_node/Formatting-Calendar-Time.html |
char * clips_test_sequence | ( | int | seq_num, |
bool | target | ||
) |
Generates a constant sequence of codes for testing the Event Optimizer.
This returns one of the 500 non target sequences or one of the 500 target sequences.
seq_num | The sequence id (in range 0.499). |
target | True for one of the target sequences, false for non target. |
bool destroy_binary_image_iterator | ( | int | image_id | ) |
Destroy an iterator for a binary image(returned by save_as_binary_image()).
image_id | The image_id returned by a previous save_as_binary_image() call. |
bool destroy_clients | ( | int | id | ) |
Destroy a Clients object that was used via the Python interface.
id | The id returned by a previous new_clients() call. |
bool destroy_clips | ( | int | id | ) |
Destroy a Clips object that was used via the Python interface.
id | The id returned by a previous new_clips() call. |
bool destroy_events | ( | int | id | ) |
Destroy a Events object that was used via the Python interface.
id | The id returned by a previous new_events() call. |
void destroy_result_iterator | ( | int | iter_id | ) |
Destroy an iterator returned by predict().
iter_id | The iter_id returned by a previous predict() call. |
bool destroy_targets | ( | int | id | ) |
Destroy a Targets object that was used via the Python interface.
id | The id returned by a previous new_targets() call. |
bool events_define_event | ( | int | id, |
char * | p_e, | ||
char * | p_d, | ||
double | w, | ||
int | code | ||
) |
Define events explicitly in an Events object stored by the EventsServer.
id | The id returned by a previous new_events() call. |
p_e | The "emitter". A C/Python string representing "owner of event". |
p_d | The "description". A C/Python string representing "the event". |
w | The "weight". A double representing a weight of the event. |
code | A unique code number identifying the event. |
char * events_describe_next_event | ( | int | id, |
char * | prev_event | ||
) |
Describes the internal representation of an event. (Iterate through all.)
id | The id returned by a previous new_events() call. |
prev_event | The previous description, either complete or the (emitter, description, weight) triple alone, or empty for the first. |
bool events_insert_row | ( | int | id, |
char * | p_e, | ||
char * | p_d, | ||
double | w | ||
) |
Process a row from a transaction file in an Events object stored by the EventsServer.
id | The id returned by a previous new_events() call. |
p_e | The "emitter". A C/Python string representing "owner of event". |
p_d | The "description". A C/Python string representing "the event". |
w | The "weight". A double representing a weight of the event. |
bool events_load_block | ( | int | id, |
char * | p_block | ||
) |
Pushes raw image blocks into an initially empty Events object and finally creates it already populated with the binary image.
id | The id returned by a previous new_events() call. The object must be empty (never called). |
p_block | If non-empty, a block in the right order making a binary image obtained for a previous events_save() call. If empty, an order to .load() the Events object and destroyed the previously stored blocks. |
int events_num_events | ( | int | id | ) |
Return the number of events stored in an Events object stored by the EventsServer.
id | The id returned by a previous new_events() call. |
char * events_optimize_events | ( | int | id, |
int | id_clips, | ||
int | id_targets, | ||
int | num_steps, | ||
int | codes_per_step, | ||
double | threshold, | ||
char * | force_include, | ||
char * | force_exclude, | ||
char * | x_form, | ||
char * | agg, | ||
double | p, | ||
int | depth, | ||
int | as_states, | ||
double | exp_decay, | ||
double | lower_bound_p, | ||
bool | log_lift | ||
) |
Events optimizer.
Optimizes the events to maximize prediction signal. (F1 score over same number of positives.) It converts code values many-to-one trying to group event codes into categories that represent similar events.
Before starting, a non-optimized Events object must be populated with an initial set of codes we want to reduce by assigning new many-to-one codes to them.
The algorithm initially removes all codes not found in the clips object. This completely removes them.
The algorithm builds a list of most promising (not already used) codes at the beginning of each step by full tree search. From that list, each code is tried downwards as {noise, new_code, last_code} for score improvement above threshold up to codes_per_step steps. And assigned a new code accordingly. The codes assigned become part of the internal EventCodeMap and in the next step they will replace their old values.
When the algorithm finishes, the internal EventCodeMap is used to rename the object codes and the whole process is reported.
id | The id returned by a previous new_events() call. The object must be empty (never called). |
id_clips | The id of a clips object with the same codes and clips for a set of clients whose prediction we optimize. |
id_targets | The id of a Targets object whose internal TargetMap defines the targets. (Internally a new Targets object will be used to make the predictions we want to optimize.) |
num_steps | The number of steps to iterate. The method will stop early if no codes are found at a step. |
codes_per_step | The number of codes to be tried from the top of the priority list at each step. |
threshold | A minimum threshold, below which a score change is not considered improvement. |
force_include | An optional pointer to a set of codes that must be included before starting. |
force_exclude | An optional pointer to a set of codes that will excluded and set to the base code. |
x_form | The x_form argument to fit the internal Targets object prediction model. |
agg | The agg argument to fit the internal Targets object prediction model. |
p | The p argument to fit the internal Targets object prediction model. |
depth | The depth argument to fit the internal Targets object prediction model. |
as_states | The as_states argument to fit the internal Targets object prediction model. |
exp_decay | Exponential Decay Factor applied to the internal score in terms of depth. That score selects what codes enter the model. The decay is applied to the average tree depth. 0 is no decay, default value = 0.00693 decays to 0.5 in 100 steps. |
lower_bound_p | Another p for lower bound, but applied to the scoring process rather than the model. |
log_lift | A boolean to set if lift (= LB(included)/LB(after inclusion)) is log() transformed or not. |
int events_save | ( | int | id | ) |
Saves an Events object as a BinaryImage.
id | The id returned by a previous new_events() call. |
bool events_set_max_num_events | ( | int | id, |
int | max_events | ||
) |
Sets the public property max_num_events in an Events object stored by the EventsServer.
id | The id returned by a previous new_events() call. |
max_events | The value to apply to max_num_events. |
bool events_set_store_strings | ( | int | id, |
bool | store | ||
) |
Sets the public property store_strings in an Events object stored by the EventsServer.
id | The id returned by a previous new_events() call. |
store | True for storing the string contents. |
char * image_block_as_string | ( | ImageBlock & | blk | ) |
Serializes a complete binary block (fixed size) as a base-64 string which is Python compatible.
blk | An ImageBlock passed by reference. |
char * image_block_as_string | ( | uint8_t * | p_in | ) |
Serializes a complete binary block (fixed size) as a base-64 string which is Python compatible.
p_in | The address of the ImageBlock as a generic unsigned pointer. |
int new_clients | ( | ) |
Create a new Clients object that can be used via the Python interface.
To free the resources allocated by this ID, the (python) caller must call destroy_clients() with the id and never use the same id after that.
int new_clips | ( | int | id_clients, |
int | id_events | ||
) |
Create a new Clips object that can be used via the Python interface.
id_clients | The id returned by a previous new_clients() call passed to the constructor. |
id_events | The id returned by a previous new_events() call passed to the constructor. |
To free the resources allocated by this ID, the (python) caller must call destroy_clips() with the id and never use the same id after that.
int new_events | ( | ) |
Create a new Events object that can be used via the Python interface.
To free the resources allocated by this ID, the (python) caller must call destroy_events() with the id and never use the same id after that.
int new_targets | ( | int | id_clips | ) |
Create a new Targets object that can be used via the Python interface.
id_clips | The id returned by a previous new_clips() call passed to the constructor. |
To free the resources allocated by this ID, the (python) caller must call destroy_targets() with the id and never use the same id after that.
char * next_binary_image_iterator | ( | int | image_id | ) |
Return the first unread binary images block in an iterator returned by a save_as_binary_image() call.
image_id | The image_id returned by a previous save_as_binary_image() call. |
double next_result_iterator | ( | int | iter_id | ) |
Return the first unread item in an iterator returned by predict().
iter_id | The iter_id returned by a previous predict() call. |
bool parse_bin_event_pt | ( | char * | line, |
BinEventPt & | ev | ||
) |
int size_binary_image_iterator | ( | int | image_id | ) |
Return the number of unread binary images blocks in an iterator returned by a save_as_binary_image() call.
image_id | The image_id returned by a previous save_as_binary_image() call. |
int size_result_iterator | ( | int | iter_id | ) |
Return the number of unread items in an iterator returned by predict().
iter_id | The iter_id returned by a previous predict() call. |
bool string_as_image_block | ( | ImageBlock & | blk, |
char * | p_in | ||
) |
Deserializes a base-64 string which is Python compatible as a complete binary ImageBlock (fixed size).
blk | An ImageBlock passed by reference. |
p_in | The address of the ImageBlock as a generic unsigned pointer. |
char * targets_describe_tree | ( | int | id | ) |
Describes some statistics of a fitted tree inside a Targets object.
id | The id returned by a previous new_targets() call. |
char * targets_describe_tree_node | ( | int | id, |
int | idx | ||
) |
Describes the internal representation of a tree node.
id | The id returned by a previous new_targets() call. |
idx | The index of the node in the tree, typically navigated using targets_tree_node_idx(). |
bool targets_fit | ( | int | id, |
char * | x_form, | ||
char * | agg, | ||
double | p, | ||
int | depth, | ||
int | as_states | ||
) |
Fit the prediction model in a Targets object stored by the TargetsServer.
id | The id returned by a previous new_targets() call. |
x_form | A possible transformation of the times. (Currently "log" or "linear".) |
agg | The mechanism used for the aggregation. (Currently "minimax", "mean" or "longest".) |
p | The width of the confidence interval for the binomial proportion used to calculate the lower bound. (E.g., p = 0.5 will estimate a lower bound of a symmetric CI with coverage of 0.5.) |
depth | The maximum depth of the tree (maximum sequence length learned). |
as_states | Treat events as states by removing repeated ones from the ClipMap keeping the time of the first instance only. When used, the ClipMap passed to the constructor by reference will be converted to states as a side effect. |
Fit can only be called once in the life of a Targets object and predict() cannot be called before fit().
bool targets_insert_target | ( | int | id, |
char * | p_c, | ||
char * | p_t | ||
) |
Utility to fill the internal TargetMap target in a Targets object stored by the TargetsServer.
The TargetMap can be initialized and given to the constructor, or an empty TargetMap can be given to the constructor ans initialized by this method. From the python interface only the latter is available.
id | The id returned by a previous new_targets() call. |
p_c | The "client". A C/Python string representing "the actor". |
p_t | The "time". A timestamp of the event as a C/Python string. (The format is given via set_time_format().) |
bool targets_load_block | ( | int | id, |
char * | p_block | ||
) |
Pushes raw image blocks into an initially empty Targets object and finally creates it already populated with the binary image.
id | The id returned by a previous new_targets() call. The object must be empty (never called). |
p_block | If non-empty, a block in the right order making a binary image obtained for a previous targets_save() call. If empty, an order to .load() the Targets object and destroyed the previously stored blocks. |
int targets_num_targets | ( | int | id | ) |
Returns the number of target points stored in the internal target variable.
id | The id returned by a previous new_targets() call. |
int targets_predict_clients | ( | int | id, |
int | id_clients | ||
) |
Predict time to target for all the clients in a given Clients object whose clips have been used to fit the model in a Targets object stored by the TargetsServer.
predict() cannot be called before fit() and can be called any number of times in all overloaded forms after that. \param id The id returned by a previous new_targets() call. \param id_clients The id returned by a previous new_clients() call passed to the constructor. \return The index of an iterator (valid for size_result_iterator(), next_result_iterator() and destroy_result_iterator() calls) with the times of the predictions in seconds or -1 on error such as id not found.
int targets_predict_clips | ( | int | id, |
int | id_clips | ||
) |
Predict time to target for a set of clients whose clips are given in a ClipMap in a Targets object stored by the TargetsServer.
predict() cannot be called before fit() and can be called any number of times in all overloaded forms after that.
id | The id returned by a previous new_targets() call. |
id_clips | The id returned by a previous new_clips() call passed to the constructor. |
int targets_save | ( | int | id | ) |
Saves an Targets object as a BinaryImage.
id | The id returned by a previous new_targets() call. |
bool targets_set_time_format | ( | int | id, |
char * | fmt | ||
) |
Sets the public property time_format to simplify the python interface in a Targets object stored by the TargetsServer.
id | The id returned by a previous new_targets() call. |
fmt | The time format in standard calendar time format http://www.gnu.org/software/libc/manual/html_node/Formatting-Calendar-Time.html |
char * targets_tree_node_children | ( | int | id, |
int | idx | ||
) |
Lists the children of a tree node.
id | The id returned by a previous new_targets() call. |
idx | The index of the node in the tree, typically navigated using targets_tree_node_idx(). |
int targets_tree_node_idx | ( | int | id, |
int | parent_idx, | ||
int | code | ||
) |
Returns the index of a tree node by parent node and code.
id | The id returned by a previous new_targets() call. |
parent_idx | The index of the parent node which is either 0 for root or returned from a previous targets_tree_node_idx() call. |
code | The code that leads in the tree from the parent node to the child node. |
char answer_block[8208] |
char answer_buffer[8192] |
char b64chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" |
uint8_t b64inverse[256] = {0} |
ClientsServer clients = {} |
int clients_num = 0 |
ClipsServer clips = {} |
int clips_num = 0 |
EventsServer events = {} |
int events_num = 0 |
BinaryImageServer image = {} |
IterTimesServer it_times = {} |
int it_times_num = 0 |
TargetsServer targets = {} |
int targets_num = 0 |