![]() |
SAGA API v9.10
|
#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 1237 of file mat_tools.h.
CSG_Classifier_Supervised::CSG_Classifier_Supervised | ( | void | ) |
Definition at line 2387 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 2406 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 2627 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 2412 of file mat_tools.cpp.
References Destroy().
void CSG_Classifier_Supervised::Destroy | ( | void | ) |
Definition at line 2423 of file mat_tools.cpp.
References 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 2796 of file mat_tools.cpp.
References 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 2813 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 1260 of file mat_tools.h.
Referenced by Get_Class().
|
inline |
Definition at line 1262 of file mat_tools.h.
Referenced by Get_Class().
|
inline |
Definition at line 1265 of file mat_tools.h.
|
inline |
Definition at line 1263 of file mat_tools.h.
|
inline |
Definition at line 1264 of file mat_tools.h.
|
inline |
Definition at line 1258 of file mat_tools.h.
Referenced by Get_Class().
|
static |
Definition at line 2843 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 2862 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 2459 of file mat_tools.cpp.
double CSG_Classifier_Supervised::Get_Threshold_Angle | ( | void | ) |
Definition at line 2451 of file mat_tools.cpp.
double CSG_Classifier_Supervised::Get_Threshold_Distance | ( | void | ) |
Definition at line 2447 of file mat_tools.cpp.
double CSG_Classifier_Supervised::Get_Threshold_Probability | ( | void | ) |
Definition at line 2455 of file mat_tools.cpp.
bool CSG_Classifier_Supervised::Get_WTA | ( | int | Method | ) |
Definition at line 2470 of file mat_tools.cpp.
References SG_CLASSIFY_SUPERVISED_WTA.
bool CSG_Classifier_Supervised::Load | ( | const CSG_String & | File | ) |
Definition at line 2484 of file mat_tools.cpp.
References CSG_MetaData::Cmp_Name(), Destroy(), CSG_Matrix::from_String(), CSG_Vector::from_String(), CSG_MetaData::Get_Child(), CSG_MetaData::Get_Children_Count(), CSG_MetaData::Get_Content(), CSG_Matrix::Get_Determinant(), CSG_Matrix::Get_Inverse(), CSG_Simple_Statistics::Get_Mean(), CSG_Vector::Get_N(), CSG_Matrix::Get_NX(), CSG_MetaData::Get_Property(), CSG_Matrix::is_Square(), CSG_MetaData::Load(), SG_Compare_Version(), and SG_Realloc().
CSG_String CSG_Classifier_Supervised::Print | ( | void | ) |
Definition at line 2591 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 2544 of file mat_tools.cpp.
References CSG_MetaData::Add_Child(), CSG_MetaData::Add_Property(), CSG_String::is_Empty(), SAGA_VERSION, CSG_MetaData::Save(), CSG_MetaData::Set_Name(), SG_Char, CSG_Matrix::to_String(), and CSG_Vector::to_String().
void CSG_Classifier_Supervised::Set_Probability_Relative | ( | bool | Value | ) |
Definition at line 2458 of file mat_tools.cpp.
void CSG_Classifier_Supervised::Set_Threshold_Angle | ( | double | Value | ) |
Definition at line 2450 of file mat_tools.cpp.
void CSG_Classifier_Supervised::Set_Threshold_Distance | ( | double | Value | ) |
Definition at line 2446 of file mat_tools.cpp.
void CSG_Classifier_Supervised::Set_Threshold_Probability | ( | double | Value | ) |
Definition at line 2454 of file mat_tools.cpp.
void CSG_Classifier_Supervised::Set_WTA | ( | int | Method, |
bool | bOn ) |
Definition at line 2462 of file mat_tools.cpp.
References SG_CLASSIFY_SUPERVISED_WTA.
bool CSG_Classifier_Supervised::Train | ( | bool | bClr_Samples = false | ) |
Definition at line 2703 of file mat_tools.cpp.
References Train(), and Train_Clr_Samples().
Referenced by Train().
bool CSG_Classifier_Supervised::Train_Add_Sample | ( | const CSG_String & | Class_ID, |
const CSG_Vector & | Features ) |
Definition at line 2675 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 2664 of file mat_tools.cpp.
Referenced by Train().