1 #if !defined(_FEATURENUMLIST_) 2 #define _FEATURENUMLIST_ 105 const KKStr& _featureListStr,
135 FeatureSelectionType _selectionType,
136 const KKStr& _featureListStr,
218 void Save (std::ostream& o);
286 void AllocateArraySize (
kkint32 size);
293 kkint32 featureNumsAllocatedSize;
294 FileDescPtr fileDesc;
301 #define _FeatureNumList_Defined_ 304 std::ostream& operator<< ( std::ostream& os,
309 std::ostream& operator<< ( std::ostream& os,
310 const FeatureNumListPtr& features
Provides a detailed description of the attributes of a dataset.
FeatureNumListPtr RandomlySelectFeatures(kkint32 numToKeep) const
Generates a new FeatureNumList object that will select at random 'numToKeep' features from this insta...
FeatureNumList operator+(kkuint16 rightSide) const
Returns new FeatureNumList that is a union of this instance and 'rightSide'.
FeatureNumList operator+(const FeatureNumList &rightSide) const
Returns new FeatureNumList that is a union of this instance and 'rightSide'.
bool Test(kkuint16 _featureNum) const
Indicates whether feature '_featureNum' is selected.
bool AllFeaturesSelected() const
Returns true if all features are selected.
Keeps track of selected features.
FeatureNumList(FileDescPtr _fileDesc)
unsigned __int16 kkuint16
16 bit unsigned integer.
FeatureNumList & operator=(const FeatureNumListPtr _features)
bool InList(kkuint16 featureNum) const
returns true if '_featureNum' is one of the selected features.
void ExtractFeatureNumsFromStr(KKStr featureListStr, bool &valid)
Will select the features specified in "featureListStr".
KKStr ToHexString() const
FeatureNumList & operator+=(kkuint16 featureNum)
Returns this FeatureNumList that is a union of this instance and 'rightSide'.
FeatureNumList(FileDescPtr _fileDesc, const KKStr &_featureListStr, bool &_valid)
Constructs a 'FeatureNumList' instance from a string that contains a list of selected features...
void SetAllFeatures()
Selects all features except those flagged as 'IgnoreAttribute' in the associated FileDesc.
const char * FeatureDecriptions[]
FileDescPtr FileDesc() const
FeatureNumList(const FeatureNumList &featureNumList)
Copy constructor.
kkuint16 * CreateFeatureNumArray() const
Allocates a array of kkint32's that is a copy of FeatureNums. The caller will own the array and is re...
FeatureNumList operator-(const FeatureNumList &rightSide) const
FeatureNumList(FileDescPtr _fileDesc, FeatureSelectionType _selectionType, const KKStr &_featureListStr, bool &_valid)
Constructs a 'FeatureNumList' instance from a string where '_selectionType' indicates if the features...
Allows you to manage very long bit strings.
FeatureNumList Complement() const
Perform a complement of selected features. That is if a feature is selected turn it off and if it is ...
kkuint16 operator[](kkint32 idx) const
Returns back the selected feature.
bool IsSubSet(const FeatureNumList &z)
Returns true if 'z' is a subset of this instance.
void UnSet()
Turns off all features so that no feature is selected.
void ToBitString(BitString &bitStr) const
kkint32 NumOfFeatures() const
void AddFeature(kkuint16 featureNum)
Adds 'featureNum' to the list of selected features. If it is already selected nothing happens...
void UnSet(kkuint16 featureNum)
Turns off specified feature 'featureNum'; if 'featureNum' is not turned on then nothing happens; same...
void Save(const KKStr &_fileName, bool &_successful, RunLog &_log)
bool operator>(const FeatureNumList &_features) const
Indicates if the Left FeatureNumList instances is greater than the right one.
static KKStr Concat(const std::vector< std::string > &values)
Concatenates the list of 'std::string' strings.
kkint32 Compare(const FeatureNumList &_features) const
Compare with another featureNumList returning -1, 0, and 1 indicating less_than, equal, or greater_than.
FeatureNumList operator-(kkuint16 rightSide) const
FeatureNumList & operator=(const FeatureNumList &_features)
static FeatureNumList AllFeatures(FileDescPtr fileDesc)
Create a FeatureNumList object where all features are selected, except ones that are flagged as Ignor...
void Save(std::ostream &o)
void Load(const KKStr &_fileName, bool &_successful, RunLog &_log)
KKStr ToString() const
Returns comma delimited list of all features selected; will make use of range specification.
kkint32 NumSelFeatures() const
FeatureNumList * FeatureNumListPtr
FeatureNumList operator*(const FeatureNumList &rightSide) const
Returns new instance that is the intersection of features.
bool operator==(const FeatureNumList &_features) const
Indicates if the two FeatureNumLiost instances have the same features selected.
Used for logging messages.
void EncodeProblem(const struct svm_paramater ¶m, struct svm_problem &prob_in, struct svm_problem &prob_out)
FeatureNumList(FileDescPtr _fileDesc, const BitString &bitString)
Constructs a 'FeatureNumList' instance using the set bits in 'bitString' to indicate which features a...
KKMLL::AttributeType FeatureAttributeType(kkint32 idx) const
FeatureNumList & operator+=(const FeatureNumList &rightSide)
Returns this FeatureNumList that is a union of this instance and 'rightSide'.
kkint32 MemoryConsumedEstimated() const
bool operator<(const FeatureNumList &_features) const
Indicates if the Left FeatureNumList instances is less than the right one.
KKStr ToCommaDelStr() const
const kkuint16 * FeatureNums() const
FeatureNumList & operator-=(kkuint16 rightSide)