SHOGUN  v1.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Attributes
CPlif Class Reference

Detailed Description

class Plif

Definition at line 37 of file Plif.h.

Inheritance diagram for CPlif:
Inheritance graph
[legend]

Public Member Functions

 CPlif (int32_t len=0)
virtual ~CPlif ()
void init_penalty_struct_cache ()
float64_t lookup_penalty_svm (float64_t p_value, float64_t *d_values) const
float64_t lookup_penalty (float64_t p_value, float64_t *svm_values) const
float64_t lookup_penalty (int32_t p_value, float64_t *svm_values) const
float64_t lookup (float64_t p_value)
void penalty_clear_derivative ()
void penalty_add_derivative_svm (float64_t p_value, float64_t *svm_values, float64_t factor)
void penalty_add_derivative (float64_t p_value, float64_t *svm_values, float64_t factor)
const float64_tget_cum_derivative (int32_t &p_len) const
bool set_transform_type (const char *type_str)
const char * get_transform_type ()
void set_id (int32_t p_id)
int32_t get_id () const
int32_t get_max_id () const
void set_use_svm (int32_t p_use_svm)
int32_t get_use_svm () const
virtual bool uses_svm_values () const
void set_use_cache (int32_t p_use_cache)
void invalidate_cache ()
int32_t get_use_cache ()
void set_plif (int32_t p_len, float64_t *p_limits, float64_t *p_penalties)
void set_plif_limits (SGVector< float64_t > p_limits)
void set_plif_penalty (SGVector< float64_t > p_penalties)
void set_plif_length (int32_t p_len)
float64_tget_plif_limits ()
float64_tget_plif_penalties ()
void set_max_value (float64_t p_max_value)
virtual float64_t get_max_value () const
void set_min_value (float64_t p_min_value)
virtual float64_t get_min_value () const
void set_plif_name (char *p_name)
char * get_plif_name () const
bool get_do_calc ()
void set_do_calc (bool b)
void get_used_svms (int32_t *num_svms, int32_t *svm_ids)
int32_t get_plif_len ()
virtual void list_plif () const
virtual const char * get_name () const
- Public Member Functions inherited from CPlifBase
 CPlifBase ()
virtual ~CPlifBase ()
- Public Member Functions inherited from CSGObject
 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)
SGIOget_global_io ()
void set_global_parallel (Parallel *parallel)
Parallelget_global_parallel ()
void set_global_version (Version *version)
Versionget_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)

Static Public Member Functions

static void delete_penalty_struct (CPlif **PEN, int32_t P)

Protected Attributes

int32_t len
float64_tlimits
float64_tpenalties
float64_tcum_derivatives
float64_t max_value
float64_t min_value
float64_tcache
enum ETransformType transform
int32_t id
char * name
int32_t use_svm
bool use_cache
bool do_calc

Additional Inherited Members

- Public Attributes inherited from CSGObject
SGIOio
Parallelparallel
Versionversion
Parameterm_parameters
Parameterm_model_selection_parameters
- Protected Member Functions inherited from CSGObject
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)

Constructor & Destructor Documentation

CPlif ( int32_t  len = 0)

constructor

Parameters
lenlen

Definition at line 23 of file Plif.cpp.

~CPlif ( )
virtual

Definition at line 43 of file Plif.cpp.

Member Function Documentation

void delete_penalty_struct ( CPlif **  PEN,
int32_t  P 
)
static

delete plif struct

Parameters
PENarray of plifs
Pid of plif

Definition at line 107 of file Plif.cpp.

const float64_t* get_cum_derivative ( int32_t &  p_len) const

get cum derivative

Parameters
p_lenlen
Returns
cum derivative

Definition at line 112 of file Plif.h.

bool get_do_calc ( )

get do calc

Returns
if calc shall be done

Definition at line 390 of file Plif.cpp.

int32_t get_id ( ) const

get ID

Returns
the ID

Definition at line 160 of file Plif.h.

int32_t get_max_id ( ) const
virtual

get maximum ID

Returns
maximum ID

Implements CPlifBase.

Definition at line 169 of file Plif.h.

virtual float64_t get_max_value ( ) const
virtual

get maximum value

Returns
maximum value

Implements CPlifBase.

Definition at line 341 of file Plif.h.

virtual float64_t get_min_value ( ) const
virtual

get minimum value

Returns
minimum value

Implements CPlifBase.

Definition at line 360 of file Plif.h.

virtual const char* get_name ( ) const
virtual
Returns
object name

Implements CSGObject.

Definition at line 431 of file Plif.h.

int32_t get_plif_len ( )

get plif len

Returns
plif len

Definition at line 409 of file Plif.h.

float64_t* get_plif_limits ( )

get Plif limits

Returns
limits

Definition at line 314 of file Plif.h.

char* get_plif_name ( ) const

get name

Returns
name

Definition at line 375 of file Plif.h.

float64_t* get_plif_penalties ( )

get plif penalty

Returns
plif penalty

Definition at line 323 of file Plif.h.

const char* get_transform_type ( )

get transform type

Returns
type_str type (string)

Definition at line 129 of file Plif.h.

int32_t get_use_cache ( )

get use cache

Returns
if cache is used

Definition at line 224 of file Plif.h.

int32_t get_use_svm ( ) const

get use SVM

Returns
if SVM is used

Definition at line 188 of file Plif.h.

void get_used_svms ( int32_t *  num_svms,
int32_t *  svm_ids 
)
virtual

get SVM_ids and number of SVMs used

Implements CPlifBase.

Definition at line 380 of file Plif.cpp.

void init_penalty_struct_cache ( )

init penalty struct cache

Definition at line 76 of file Plif.cpp.

void invalidate_cache ( )

invalidate the cache

Definition at line 214 of file Plif.h.

virtual void list_plif ( ) const
virtual

print PLIF

lists some properties of the PLIF

Implements CPlifBase.

Definition at line 418 of file Plif.h.

float64_t lookup ( float64_t  p_value)

lookup

Parameters
p_valuevalue
Returns
a penalty

Definition at line 81 of file Plif.h.

float64_t lookup_penalty ( float64_t  p_value,
float64_t svm_values 
) const
virtual

lookup penalty float64_t

Parameters
p_valuevalue
svm_valuesSVM values
Returns
the penalty

Implements CPlifBase.

Definition at line 197 of file Plif.cpp.

float64_t lookup_penalty ( int32_t  p_value,
float64_t svm_values 
) const
virtual

lookup penalty int32_t

Parameters
p_valuevalue
svm_valuesSVM values
Returns
the penalty

Implements CPlifBase.

Definition at line 177 of file Plif.cpp.

float64_t lookup_penalty_svm ( float64_t  p_value,
float64_t d_values 
) const

lookup penalty SVM

Parameters
p_valuevalue
d_valuesd values
Returns
the penalty

Definition at line 114 of file Plif.cpp.

void penalty_add_derivative ( float64_t  p_value,
float64_t svm_values,
float64_t  factor 
)
virtual

penalty add derivative

Parameters
p_valuevalue
svm_valuesSVM values
factorfactor weighting the added value

Implements CPlifBase.

Definition at line 281 of file Plif.cpp.

void penalty_add_derivative_svm ( float64_t  p_value,
float64_t svm_values,
float64_t  factor 
)

penalty add derivative SVM

Parameters
p_valuevalue
svm_valuesSVM values
factorfactor weighting the added value

Definition at line 333 of file Plif.cpp.

void penalty_clear_derivative ( )
virtual

penalty clear derivative

Implements CPlifBase.

Definition at line 275 of file Plif.cpp.

void set_do_calc ( bool  b)

set do calc

Parameters
bif calc shall be done

Definition at line 395 of file Plif.cpp.

void set_id ( int32_t  p_id)

set ID

Parameters
p_idthe id to set

Definition at line 151 of file Plif.h.

void set_max_value ( float64_t  p_max_value)

set maximum value

Parameters
p_max_valuemaximum value

Definition at line 331 of file Plif.h.

void set_min_value ( float64_t  p_min_value)

set minimum value

Parameters
p_min_valueminimum value

Definition at line 350 of file Plif.h.

void set_plif ( int32_t  p_len,
float64_t p_limits,
float64_t p_penalties 
)

set plif

Parameters
p_lenlen
p_limitslimit
p_penaltiespenalties

Definition at line 235 of file Plif.h.

void set_plif_length ( int32_t  p_len)

set plif length

Parameters
p_lenlen

Definition at line 285 of file Plif.h.

void set_plif_limits ( SGVector< float64_t p_limits)

set plif_limits

Parameters
p_limitslimit

Definition at line 254 of file Plif.h.

void set_plif_name ( char *  p_name)

set name

Parameters
p_namename

Definition at line 100 of file Plif.cpp.

void set_plif_penalty ( SGVector< float64_t p_penalties)

set plif penalty

Parameters
p_penaltiespenalties

Definition at line 270 of file Plif.h.

bool set_transform_type ( const char *  type_str)

set transform type

Parameters
type_strtype (string)
Returns
if setting was successful

Definition at line 52 of file Plif.cpp.

void set_use_cache ( int32_t  p_use_cache)

set use cache

Parameters
p_use_cacheif cache shall be used

Definition at line 206 of file Plif.h.

void set_use_svm ( int32_t  p_use_svm)

set use SVM

Parameters
p_use_svmif SVM shall be used

Definition at line 178 of file Plif.h.

virtual bool uses_svm_values ( ) const
virtual

check if plif uses SVM values

Returns
if plif uses SVM values

Implements CPlifBase.

Definition at line 197 of file Plif.h.

Member Data Documentation

float64_t* cache
protected

cache

Definition at line 447 of file Plif.h.

float64_t* cum_derivatives
protected

cum derivatives

Definition at line 441 of file Plif.h.

bool do_calc
protected

do calc if this is true: lookup_penalty behaves normal else: lookup_penalty returns the p_value untransformed

Definition at line 461 of file Plif.h.

int32_t id
protected

id

Definition at line 451 of file Plif.h.

int32_t len
protected

len

Definition at line 435 of file Plif.h.

float64_t* limits
protected

limits

Definition at line 437 of file Plif.h.

float64_t max_value
protected

maximum value

Definition at line 443 of file Plif.h.

float64_t min_value
protected

minimum value

Definition at line 445 of file Plif.h.

char* name
protected

name

Definition at line 453 of file Plif.h.

float64_t* penalties
protected

penalties

Definition at line 439 of file Plif.h.

enum ETransformType transform
protected

transform type

Definition at line 449 of file Plif.h.

bool use_cache
protected

if cache shall be used

Definition at line 457 of file Plif.h.

int32_t use_svm
protected

if SVM shall be used

Definition at line 455 of file Plif.h.


The documentation for this class was generated from the following files:

SHOGUN Machine Learning Toolbox - Documentation