SHOGUN
v1.1.0
|
store plif arrays for all transitions in the model
Definition at line 28 of file PlifMatrix.h.
Public Member Functions | |
CPlifMatrix () | |
~CPlifMatrix () | |
CPlif ** | get_PEN () |
CPlifBase ** | get_plif_matrix () |
int32_t | get_num_states () |
CPlifBase ** | get_state_signals () |
int32_t | get_num_plifs () |
int32_t | get_num_limits () |
void | create_plifs (int32_t num_plifs, int32_t num_limits) |
void | set_plif_ids (SGVector< int32_t > ids) |
void | set_plif_min_values (SGVector< float64_t > min_values) |
void | set_plif_max_values (SGVector< float64_t > max_values) |
void | set_plif_use_cache (SGVector< bool > use_cache) |
void | set_plif_use_svm (SGVector< int32_t > use_svm) |
void | set_plif_limits (SGMatrix< float64_t > limits) |
void | set_plif_penalties (SGMatrix< float64_t > penalties) |
void | set_plif_names (SGString< char > *names, int32_t num_values, int32_t maxlen=0) |
void | set_plif_transform_type (SGString< char > *transform_type, int32_t num_values, int32_t maxlen=0) |
int32_t | get_plif_id (int32_t idx) |
bool | compute_plif_matrix (SGNDArray< float64_t > penalties_array) |
bool | compute_signal_plifs (SGMatrix< int32_t > state_signals) |
void | set_plif_state_signal_matrix (int32_t *plif_id_matrix, int32_t m, int32_t n) |
virtual const char * | get_name () const |
![]() | |
CSGObject () | |
CSGObject (const CSGObject &orig) | |
virtual | ~CSGObject () |
virtual bool | is_generic (EPrimitiveType *generic) const |
template<class T > | |
void | set_generic () |
void | unset_generic () |
virtual void | print_serializable (const char *prefix="") |
virtual bool | save_serializable (CSerializableFile *file, const char *prefix="") |
virtual bool | load_serializable (CSerializableFile *file, const char *prefix="") |
void | set_global_io (SGIO *io) |
SGIO * | get_global_io () |
void | set_global_parallel (Parallel *parallel) |
Parallel * | get_global_parallel () |
void | set_global_version (Version *version) |
Version * | get_global_version () |
SGVector< char * > | get_modelsel_names () |
char * | get_modsel_param_descr (const char *param_name) |
index_t | get_modsel_param_index (const char *param_name) |
Protected Attributes | |
CPlif ** | m_PEN |
int32_t | m_num_plifs |
int32_t | m_num_limits |
int32_t | m_num_states |
int | m_feat_dim3 |
CArray< int32_t > | m_ids |
CPlifBase ** | m_plif_matrix |
CPlifBase ** | m_state_signals |
Additional Inherited Members | |
![]() | |
SGIO * | io |
Parallel * | parallel |
Version * | version |
Parameter * | m_parameters |
Parameter * | m_model_selection_parameters |
![]() | |
virtual void | load_serializable_pre () throw (ShogunException) |
virtual void | load_serializable_post () throw (ShogunException) |
virtual void | save_serializable_pre () throw (ShogunException) |
virtual void | save_serializable_post () throw (ShogunException) |
CPlifMatrix | ( | ) |
constructor
Definition at line 8 of file PlifMatrix.cpp.
~CPlifMatrix | ( | ) |
destructor
Definition at line 13 of file PlifMatrix.cpp.
parse an 3D array of plif ids and compute the corresponding 2D plif matrix by subsuming the third dim into one PlifArray; Note: the class PlifArray is derived from PlifBase. It computes all individual plifs and sums them up.
penalties_array | 3D array of plif ids (nofstates x nofstates x nof(features for each transition)) |
Definition at line 182 of file PlifMatrix.cpp.
bool compute_signal_plifs | ( | SGMatrix< int32_t > | state_signals | ) |
parse an 3D array of plif ids and compute the corresponding 3D plif array;
state_signals | mapping of features to states |
Definition at line 245 of file PlifMatrix.cpp.
void create_plifs | ( | int32_t | num_plifs, |
int32_t | num_limits | ||
) |
create an empty plif matrix of size num_plifs * num_limits
num_plifs | number of plifs |
num_limits | number of plif limits |
Definition at line 27 of file PlifMatrix.cpp.
|
virtual |
int32_t get_num_limits | ( | ) |
get number of support points for picewise linear transformations (PLiFs)
Definition at line 77 of file PlifMatrix.h.
int32_t get_num_plifs | ( | ) |
int32_t get_num_states | ( | ) |
get number of states the number of states determines the size of the plif matrix
Definition at line 58 of file PlifMatrix.h.
CPlif** get_PEN | ( | ) |
int32_t get_plif_id | ( | int32_t | idx | ) |
return plif id for idx
idx | idx of plif |
Definition at line 153 of file PlifMatrix.h.
CPlifBase** get_plif_matrix | ( | ) |
CPlifBase** get_state_signals | ( | ) |
get plifs defining the mapping of signals to states
Definition at line 65 of file PlifMatrix.h.
void set_plif_ids | ( | SGVector< int32_t > | ids | ) |
set all abscissa values of the support points for the for the pice wise linear transformations (PLiFs)
limits | array of length num_plifs*num_limits |
Definition at line 104 of file PlifMatrix.cpp.
set array of max values for all plifs
max_values | array of max values |
Definition at line 68 of file PlifMatrix.cpp.
set array of min values for all plifs
min_values | array of min values |
Definition at line 56 of file PlifMatrix.cpp.
void set_plif_names | ( | SGString< char > * | names, |
int32_t | num_values, | ||
int32_t | maxlen = 0 |
||
) |
set names for the PLiFs
names | names |
num_values | number of names |
maxlen | maximal string len of the names |
Definition at line 145 of file PlifMatrix.cpp.
set all ordinate values of the support points for the for the pice wise linear transformations (PLiFs)
penalties | plif values: array of length num_plifs*num_limits |
Definition at line 124 of file PlifMatrix.cpp.
void set_plif_state_signal_matrix | ( | int32_t * | plif_id_matrix, |
int32_t | m, | ||
int32_t | n | ||
) |
set best path plif state signal matrix
plif_id_matrix | plif id matrix |
m | dimension m of matrix |
n | dimension n of matrix |
Definition at line 272 of file PlifMatrix.cpp.
void set_plif_transform_type | ( | SGString< char > * | transform_type, |
int32_t | num_values, | ||
int32_t | maxlen = 0 |
||
) |
set plif transform type; for some features the plifs live in log space therefore the input values have to be transformed to log space before the transformation can be applied; the transform type is string coded
transform_type | transform type (e.g. LOG(x), LOG(x+1), ...) |
num_values | number of transform strings |
maxlen | of transform strings |
Definition at line 159 of file PlifMatrix.cpp.
void set_plif_use_cache | ( | SGVector< bool > | use_cache | ) |
set plif use cache
use_cache | set array of bool values |
Definition at line 80 of file PlifMatrix.cpp.
void set_plif_use_svm | ( | SGVector< int32_t > | use_svm | ) |
|
protected |
maximal number of features for a given state
Definition at line 206 of file PlifMatrix.h.
|
protected |
plif ids
Definition at line 209 of file PlifMatrix.h.
|
protected |
number of supporting points per plif
Definition at line 200 of file PlifMatrix.h.
|
protected |
number of plifs
Definition at line 197 of file PlifMatrix.h.
|
protected |
number of states in model
Definition at line 203 of file PlifMatrix.h.
|
protected |
array of plifs
Definition at line 194 of file PlifMatrix.h.
|
protected |
plif matrix
Definition at line 212 of file PlifMatrix.h.
|
protected |
state signals
Definition at line 215 of file PlifMatrix.h.