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

Detailed Description

Class PRCEvaluation used to evaluate PRC (Precision Recall Curve) and an area under PRC curve (auPRC).

Definition at line 25 of file PRCEvaluation.h.

Inheritance diagram for CPRCEvaluation:
Inheritance graph
[legend]

Public Member Functions

 CPRCEvaluation ()
virtual ~CPRCEvaluation ()
virtual const char * get_name () const
virtual float64_t evaluate (CLabels *predicted, CLabels *ground_truth)
EEvaluationDirection get_evaluation_direction ()
float64_t get_auPRC ()
SGMatrix< float64_tget_PRC ()
SGVector< float64_tget_thresholds ()
- Public Member Functions inherited from CBinaryClassEvaluation
 CBinaryClassEvaluation ()
virtual ~CBinaryClassEvaluation ()
- Public Member Functions inherited from CEvaluation
 CEvaluation ()
virtual ~CEvaluation ()
- 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)

Protected Attributes

float64_tm_PRC_graph
float64_tm_thresholds
float64_t m_auPRC
int32_t m_PRC_length
bool m_computed

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

constructor

Definition at line 29 of file PRCEvaluation.h.

~CPRCEvaluation ( )
virtual

destructor

Definition at line 16 of file PRCEvaluation.cpp.

Member Function Documentation

float64_t evaluate ( CLabels predicted,
CLabels ground_truth 
)
virtual

evaluate PRC and auPRC

Parameters
predictedlabels
ground_truthlabels assumed to be correct
Returns
auPRC

Implements CBinaryClassEvaluation.

Definition at line 21 of file PRCEvaluation.cpp.

float64_t get_auPRC ( )

get auPRC

Returns
area under PRC (auPRC)

Definition at line 110 of file PRCEvaluation.cpp.

EEvaluationDirection get_evaluation_direction ( )
virtual
Returns
whether criterium has to be maximized or minimized

Implements CEvaluation.

Definition at line 46 of file PRCEvaluation.h.

virtual const char* get_name ( ) const
virtual

get name

Implements CSGObject.

Definition at line 37 of file PRCEvaluation.h.

SGMatrix< float64_t > get_PRC ( )

get PRC

Returns
PRC graph matrix

Definition at line 90 of file PRCEvaluation.cpp.

SGVector< float64_t > get_thresholds ( )

get thresholds corresponding to points on the PRC graph

Returns
thresholds

Definition at line 100 of file PRCEvaluation.cpp.

Member Data Documentation

float64_t m_auPRC
protected

area under PRC graph

Definition at line 74 of file PRCEvaluation.h.

bool m_computed
protected

indicator of PRC and auPRC being computed already

Definition at line 80 of file PRCEvaluation.h.

float64_t* m_PRC_graph
protected

2-d array used to store PRC graph

Definition at line 68 of file PRCEvaluation.h.

int32_t m_PRC_length
protected

number of points in PRC graph

Definition at line 77 of file PRCEvaluation.h.

float64_t* m_thresholds
protected

vector with thresholds corresponding to points on the PRC graph

Definition at line 71 of file PRCEvaluation.h.


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

SHOGUN Machine Learning Toolbox - Documentation