SAGA API
v9.6
|
#include <mat_tools.h>
Public Member Functions | |
CSG_Classifier_Supervised (void) | |
virtual | ~CSG_Classifier_Supervised (void) |
void | Create (int nFeatures) |
void | Destroy (void) |
bool | Load (const CSG_String &File) |
bool | Save (const CSG_String &File, const SG_Char *Feature_Info=NULL) |
bool | Train_Clr_Samples (void) |
bool | Train_Add_Sample (const CSG_String &Class_ID, const CSG_Vector &Features) |
bool | Train (bool bClr_Samples=false) |
bool | Add_Class (const CSG_String &Class_ID, const CSG_Vector &Mean, const CSG_Vector &Min, const CSG_Vector &Max, const CSG_Matrix &Cov) |
CSG_String | Print (void) |
int | Get_Feature_Count (void) |
int | Get_Class_Count (void) |
const CSG_String & | Get_Class_ID (int iClass) |
double | Get_Class_Mean (int iClass, int iFeature) |
double | Get_Class_Minimum (int iClass, int iFeature) |
double | Get_Class_Maximum (int iClass, int iFeature) |
int | Get_Class (const CSG_String &Class_ID) |
bool | Get_Class (const CSG_Vector &Features, int &Class, double &Quality, int Method) |
void | Set_Threshold_Distance (double Value) |
double | Get_Threshold_Distance (void) |
void | Set_Threshold_Angle (double Value) |
double | Get_Threshold_Angle (void) |
void | Set_Threshold_Probability (double Value) |
double | Get_Threshold_Probability (void) |
void | Set_Probability_Relative (bool Value) |
bool | Get_Probability_Relative (void) |
void | Set_WTA (int Method, bool bOn) |
bool | Get_WTA (int Method) |
Static Public Member Functions | |
static CSG_String | Get_Name_of_Method (int Method) |
static CSG_String | Get_Name_of_Quality (int Method) |
Definition at line 1221 of file mat_tools.h.
CSG_Classifier_Supervised::CSG_Classifier_Supervised | ( | void | ) |
Definition at line 2359 of file mat_tools.cpp.
References SG_CLASSIFY_SUPERVISED_MaximumLikelihood, SG_CLASSIFY_SUPERVISED_MinimumDistance, SG_CLASSIFY_SUPERVISED_SAM, and SG_CLASSIFY_SUPERVISED_WTA.
|
virtual |
Definition at line 2381 of file mat_tools.cpp.
References Destroy().
bool CSG_Classifier_Supervised::Add_Class | ( | const CSG_String & | Class_ID, |
const CSG_Vector & | Mean, | ||
const CSG_Vector & | Min, | ||
const CSG_Vector & | Max, | ||
const CSG_Matrix & | Cov | ||
) |
Definition at line 2602 of file mat_tools.cpp.
References CSG_Matrix::Get_Determinant(), CSG_Matrix::Get_Inverse(), CSG_Simple_Statistics::Get_Mean(), CSG_Vector::Get_N(), CSG_Matrix::Get_NCols(), CSG_Matrix::Get_NRows(), and SG_Realloc().
void CSG_Classifier_Supervised::Create | ( | int | nFeatures | ) |
Definition at line 2387 of file mat_tools.cpp.
References Destroy().
void CSG_Classifier_Supervised::Destroy | ( | void | ) |
Definition at line 2398 of file mat_tools.cpp.
References CSG_String::Clear(), and SG_FREE_SAFE.
Referenced by Create(), Load(), and ~CSG_Classifier_Supervised().
int CSG_Classifier_Supervised::Get_Class | ( | const CSG_String & | Class_ID | ) |
Definition at line 2775 of file mat_tools.cpp.
References CSG_String::Cmp(), Get_Class_Count(), and Get_Class_ID().
Referenced by Train_Add_Sample().
bool CSG_Classifier_Supervised::Get_Class | ( | const CSG_Vector & | Features, |
int & | Class, | ||
double & | Quality, | ||
int | Method | ||
) |
Definition at line 2792 of file mat_tools.cpp.
References Get_Feature_Count(), CSG_Vector::Get_N(), SG_CLASSIFY_SUPERVISED_BinaryEncoding, SG_CLASSIFY_SUPERVISED_Mahalonobis, SG_CLASSIFY_SUPERVISED_MaximumLikelihood, SG_CLASSIFY_SUPERVISED_MinimumDistance, SG_CLASSIFY_SUPERVISED_ParallelEpiped, SG_CLASSIFY_SUPERVISED_SAM, SG_CLASSIFY_SUPERVISED_SID, and SG_CLASSIFY_SUPERVISED_WTA.
|
inline |
Definition at line 1244 of file mat_tools.h.
Referenced by Get_Class().
|
inline |
Definition at line 1246 of file mat_tools.h.
Referenced by Get_Class().
|
inline |
Definition at line 1249 of file mat_tools.h.
|
inline |
Definition at line 1247 of file mat_tools.h.
|
inline |
Definition at line 1248 of file mat_tools.h.
|
inline |
Definition at line 1242 of file mat_tools.h.
Referenced by Get_Class().
|
static |
Definition at line 2823 of file mat_tools.cpp.
References _TL, SG_CLASSIFY_SUPERVISED_BinaryEncoding, SG_CLASSIFY_SUPERVISED_Mahalonobis, SG_CLASSIFY_SUPERVISED_MaximumLikelihood, SG_CLASSIFY_SUPERVISED_MinimumDistance, SG_CLASSIFY_SUPERVISED_ParallelEpiped, SG_CLASSIFY_SUPERVISED_SAM, SG_CLASSIFY_SUPERVISED_SID, SG_CLASSIFY_SUPERVISED_SVM, SG_CLASSIFY_SUPERVISED_WTA, and SG_T.
|
static |
Definition at line 2842 of file mat_tools.cpp.
References _TL, SG_CLASSIFY_SUPERVISED_BinaryEncoding, SG_CLASSIFY_SUPERVISED_Mahalonobis, SG_CLASSIFY_SUPERVISED_MaximumLikelihood, SG_CLASSIFY_SUPERVISED_MinimumDistance, SG_CLASSIFY_SUPERVISED_ParallelEpiped, SG_CLASSIFY_SUPERVISED_SAM, SG_CLASSIFY_SUPERVISED_SID, SG_CLASSIFY_SUPERVISED_SVM, SG_CLASSIFY_SUPERVISED_WTA, and SG_T.
bool CSG_Classifier_Supervised::Get_Probability_Relative | ( | void | ) |
Definition at line 2434 of file mat_tools.cpp.
double CSG_Classifier_Supervised::Get_Threshold_Angle | ( | void | ) |
Definition at line 2426 of file mat_tools.cpp.
double CSG_Classifier_Supervised::Get_Threshold_Distance | ( | void | ) |
Definition at line 2422 of file mat_tools.cpp.
double CSG_Classifier_Supervised::Get_Threshold_Probability | ( | void | ) |
Definition at line 2430 of file mat_tools.cpp.
bool CSG_Classifier_Supervised::Get_WTA | ( | int | Method | ) |
Definition at line 2445 of file mat_tools.cpp.
References SG_CLASSIFY_SUPERVISED_WTA.
bool CSG_Classifier_Supervised::Load | ( | const CSG_String & | File | ) |
Definition at line 2459 of file mat_tools.cpp.
References CSG_MetaData::Cmp_Name(), Destroy(), CSG_MetaData::Get_Child(), CSG_MetaData::Get_Children_Count(), CSG_MetaData::Get_Content(), CSG_Simple_Statistics::Get_Mean(), CSG_MetaData::Get_Property(), CSG_MetaData::Load(), SG_Compare_Version(), and SG_Realloc().
CSG_String CSG_Classifier_Supervised::Print | ( | void | ) |
Definition at line 2566 of file mat_tools.cpp.
References CSG_String::Format(), and SG_Get_String().
bool CSG_Classifier_Supervised::Save | ( | const CSG_String & | File, |
const SG_Char * | Feature_Info = NULL |
||
) |
Definition at line 2519 of file mat_tools.cpp.
References CSG_MetaData::Add_Child(), CSG_MetaData::Add_Property(), CSG_String::is_Empty(), SAGA_VERSION, CSG_MetaData::Save(), and CSG_MetaData::Set_Name().
void CSG_Classifier_Supervised::Set_Probability_Relative | ( | bool | Value | ) |
Definition at line 2433 of file mat_tools.cpp.
void CSG_Classifier_Supervised::Set_Threshold_Angle | ( | double | Value | ) |
Definition at line 2425 of file mat_tools.cpp.
void CSG_Classifier_Supervised::Set_Threshold_Distance | ( | double | Value | ) |
Definition at line 2421 of file mat_tools.cpp.
void CSG_Classifier_Supervised::Set_Threshold_Probability | ( | double | Value | ) |
Definition at line 2429 of file mat_tools.cpp.
void CSG_Classifier_Supervised::Set_WTA | ( | int | Method, |
bool | bOn | ||
) |
Definition at line 2437 of file mat_tools.cpp.
References SG_CLASSIFY_SUPERVISED_WTA.
bool CSG_Classifier_Supervised::Train | ( | bool | bClr_Samples = false | ) |
Definition at line 2680 of file mat_tools.cpp.
References Train_Clr_Samples().
bool CSG_Classifier_Supervised::Train_Add_Sample | ( | const CSG_String & | Class_ID, |
const CSG_Vector & | Features | ||
) |
Definition at line 2652 of file mat_tools.cpp.
References Get_Class(), CSG_Vector::Get_N(), and SG_Realloc().
bool CSG_Classifier_Supervised::Train_Clr_Samples | ( | void | ) |
Definition at line 2641 of file mat_tools.cpp.
Referenced by Train().