1 #ifndef _FEATUREENCODER_ 2 #define _FEATUREENCODER_ 30 #ifndef _FEATURENUMLIST_ 71 FeatureVectorListPtr compressedExamples,
137 kkint32 DetermineNumberOfNeededXspaceNodes (FeatureVectorListPtr src)
const;
155 kkint32 xSpaceNeededPerExample;
virtual void ReadXML(XmlStream &s, XmlTagConstPtr tag, VolConstBool &cancelFlag, RunLog &log)
kkint32 CodedNumOfFeatures() const
FeatureVectorListPtr CreateEncodedFeatureVector(FeatureVectorList &srcData)
Keeps track of selected features.
MLClassPtr Class2() const
MLClassPtr Class1() const
~FeatureEncoder()
Frees any memory allocated by, and owned by the FeatureEncoder.
FileDescPtr CreateEncodedFileDesc(ostream *o)
FeatureVectorListPtr EncodeAllExamples(const FeatureVectorListPtr srcData)
kkint32 XSpaceNeededPerExample()
Container class for FeatureVector derived objects.
FeatureNumList * FeatureNumListPtr
virtual void WriteXML(const KKStr &varName, ostream &o) const
XmlTag const * XmlTagConstPtr
Manages the reading and writing of objects in a simple XML format. For a class to be supported by Xml...
XSpacePtr EncodeAExample(FeatureVectorPtr example)
Converts a single example into the svm_problem format.
Binds MLClass objects to the appropriate number that the Learning Algorithm expects.
static KKStr Concat(const std::vector< std::string > &values)
Concatenates the list of 'std::string' strings.
void EncodeIntoSparseMatrix(FeatureVectorListPtr src, ClassAssignments &assignments, XSpacePtr &xSpace, kkint32 &totalxSpaceUsed, struct svm_problem &prob, RunLog &log)
Compresses 'src' examples, allocating new 'xSpace' data structure.
FeatureVectorPtr EncodeAExample(FileDescPtr encodedFileDesc, FeatureVectorPtr src)
void CompressExamples(FeatureVectorListPtr srcExamples, FeatureVectorListPtr compressedExamples, ClassAssignments &assignments)
Left over from BitReduction days; removed all code except that which processed the NO bit reduction o...
Used for logging messages.
void EncodeProblem(const struct svm_paramater ¶m, struct svm_problem &prob_in, struct svm_problem &prob_out)
FeatureEncoder(FileDescPtr _fileDesc, MLClassPtr _class1, MLClassPtr _class2, const FeatureNumList &_selectedFeatures, SVM_EncodingMethod _encodingMethod, double _c_Param)
Constructs a Feature Encoder object.
void EncodeAExample(FeatureVectorPtr example, svm_node *xSpace, kkint32 &xSpaceUsed)
Converts a single example into the svm_problem format.
kkint32 MemoryConsumedEstimated() const
volatile const bool VolConstBool
FeWhatToDo * FeWhatToDoPtr