1 #ifndef _CROSSVALIDATIONVOTING_ 2 #define _CROSSVALIDATIONVOTING_ 10 #if !defined(FeatureVector_Defined_) 16 #if !defined(_FeatureVectorList_Defined_) 22 #if !defined(_MLCLASS_) 31 #if !defined(_ConfussionMatrix2_Defined_) 37 #if !defined(_TrainingConfiguration2_Defined_) 42 #if !defined(_TrainingConfiguration2List_Defined_) 48 #if !defined(_FileDesc_Defined_) 59 FeatureVectorListPtr _examples,
60 MLClassListPtr _mlClasses,
62 bool _featuresAreAlreadyNormalized,
71 bool* classedCorrectly,
87 void AllocateMemory (
RunLog& log);
89 void CrossValidate (FeatureVectorListPtr testImages,
90 FeatureVectorListPtr trainingExamples,
92 bool* classedCorrectly,
96 void DeleteAllocatedMemory ();
99 TrainingConfiguration2ListPtr configs;
100 bool featuresAreAlreadyNormalized;
101 FileDescPtr fileDesc;
102 float* foldAccuracies;
104 ConfusionMatrix2Ptr confusionMatrix;
105 ConfusionMatrix2Ptr* cmByNumOfConflicts;
106 FeatureVectorListPtr examples;
107 MLClassListPtr mlClasses;
114 kkint32* numOfWinnersOneOfTheWinners;
115 double classificationTime;
Provides a detailed description of the attributes of a dataset.
Represents a "Class" in the Machine Learning Sense.
double TrainingTime() const
void RunCrossValidation(RunLog &log)
Container class for FeatureVector derived objects.
KKStr FoldAccuracysToStr() const
double ClassificationTime() const
kkint32 NumOfSupportVectors() const
CrossValidationVoting * CrossValidationVotingPtr
static KKStr Concat(const std::vector< std::string > &values)
Concatenates the list of 'std::string' strings.
void RunValidationOnly(FeatureVectorListPtr validationData, bool *classedCorrectly, RunLog &log)
CrossValidationVoting(TrainingConfiguration2ListPtr _configs, FeatureVectorListPtr _examples, MLClassListPtr _mlClasses, kkint32 _numOfFolds, bool _featuresAreAlreadyNormalized, FileDescPtr _fileDesc)
Used for logging messages.
void EncodeProblem(const struct svm_paramater ¶m, struct svm_problem &prob_in, struct svm_problem &prob_out)
ConfusionMatrix2Ptr ConfussionMatrix()
Maintains a list of MLClass instances.
Represents a Feature Vector of a single example, labeled or unlabeled.
A confusion matrix object that is used to record the results from a CrossValidation. <see also cref="CrossValidation"
float FoldAccuracy(kkint32 foldNum) const