ARFF = Attribute-Relation File Format. This stores richer information than GRelation. This includes a name, a name for each attribute, and names for each supported nominal value.
|
| GArffRelation () |
| General-purpose constructor. More...
|
|
| GArffRelation (const GDomNode *pNode) |
| Deserializing constructor. More...
|
|
virtual | ~GArffRelation () |
|
void | addAttribute (const char *szName, size_t nValues, std::vector< const char * > *pValues) |
| Adds a new attribute (column) to the relation. More...
|
|
int | addAttrValue (size_t nAttr, const char *szValue) |
| Adds a new possible value to a nominal attribute. Returns the numerical form of the new value. More...
|
|
const char * | attrName (size_t nAttr) const |
| Returns the name of the attribute with index nAttr. More...
|
|
virtual std::string | attrNameStr (std::size_t nAttr) const |
| Returns the name of the attribute with index nAttr as a standard string object or "" if the atribute has no name. More...
|
|
virtual GRelation * | clone () const |
| Returns a deep copy of this object. More...
|
|
virtual GRelation * | cloneMinimal () const |
| Returns a relation containing the same value counts as this object, but not containing superfluous things, such as human-readable strings. (The returned relation will be of a different type.) More...
|
|
virtual GRelation * | cloneSub (size_t start, size_t count) const |
| Makes a deep copy of the specified subset of this relation. More...
|
|
virtual void | copyAttr (const GRelation *pThat, size_t nAttr) |
| Adds a copy of the specified attribute to this relation. More...
|
|
virtual void | deleteAttributes (size_t nAttr, size_t count) |
| Deletes an attribute. More...
|
|
void | dropValue (size_t attr, int val) |
| Drops the specified value from the list of possible values. (Swaps the last value in to fill its slot.) More...
|
|
int | findEnumeratedValue (size_t nAttr, const char *szValue) const |
| Returns the nominal index for the specified attribute with the given value. More...
|
|
virtual void | flush () |
| Deletes all the attributes. More...
|
|
virtual bool | isCompatible (const GRelation &that) const |
| Returns true iff the attributes in both relations have the same names, the same number of values, and the names of those values all match. (Empty strings are considered to match everything.) More...
|
|
const char * | name () const |
| Returns the name of the relation. More...
|
|
void | parseAttribute (GArffTokenizer &tok) |
| Parses the meta-data for an attribute. More...
|
|
double | parseValue (size_t attr, const char *val) |
| Parses a value. More...
|
|
virtual void | printAttrName (std::ostream &stream, size_t column) const |
| Prints the specified attribute name to a stream. More...
|
|
virtual void | printAttrValue (std::ostream &stream, size_t column, double value, const char *missing="?") const |
| Prints the specified value to a stream. More...
|
|
virtual GDomNode * | serialize (GDom *pDoc) const |
| Marshalls this object to a DOM, which can be saved to a variety of serial formats. More...
|
|
void | setAttrName (size_t attr, const char *szNewName) |
| Sets the name of the specified attribute. More...
|
|
virtual void | setAttrValueCount (size_t nAttr, size_t nValues) |
| Sets the number of values for the specified attribute. More...
|
|
void | setName (const char *szName) |
| Sets the name of this relation. More...
|
|
virtual void | swapAttributes (size_t nAttr1, size_t nAttr2) |
| Swaps two columns. More...
|
|
virtual RelationType | type () const |
| Returns the type of relation. More...
|
|
| GMixedRelation () |
| Makes an empty relation. More...
|
|
| GMixedRelation (std::vector< size_t > &attrValues) |
| Construct a mixed relation. attrValues specifies the number of nominal values in each attribute (column), or 0 for continuous attributes. More...
|
|
| GMixedRelation (const GDomNode *pNode) |
| Loads from a DOM. More...
|
|
| GMixedRelation (const GRelation *pCopyMe) |
| Makes a copy of pCopyMe. More...
|
|
| GMixedRelation (const GRelation *pCopyMe, size_t firstAttr, size_t attrCount) |
| Makes a copy of the specified range of pCopyMe. More...
|
|
virtual | ~GMixedRelation () |
|
void | addAttr (size_t nValues) |
| If nValues is zero, adds a real attribute. If nValues is
0, adds an attribute with "nValues" nominal values
More...
|
|
void | addAttrs (size_t attrCount, size_t valueCount) |
| Adds "attrCount" new attributes, each with "valueCount" values. (Use valueCount=0 for continuous attributes.) More...
|
|
void | addAttrs (const GRelation ©Me, size_t firstAttr=0, size_t attrCount=INVALID_INDEX) |
| Copies the specified attributes and adds them to this relation. If attrCount < 0, then it will copy all attributes from firstAttr to the end. More...
|
|
virtual bool | areContinuous (size_t first=0, size_t count=INVALID_INDEX) const |
| Returns true iff all attributes in the specified range are continuous. More...
|
|
virtual bool | areNominal (size_t first=0, size_t count=INVALID_INDEX) const |
| Returns true iff all attributes in the specified range are nominal. More...
|
|
void | copy (const GRelation *pCopyMe) |
| Flushes this relation and then copies all of the attributes from pCopyMe. More...
|
|
virtual size_t | size () const |
| Returns the total number of attributes in this relation. More...
|
|
virtual size_t | valueCount (size_t nAttr) const |
| Returns the number of nominal values in the specified attribute. More...
|
|
| GRelation () |
|
virtual | ~GRelation () |
|
void | print (std::ostream &stream) const |
| Prints this relation in ARFF format to the specified stream. More...
|
|
void | printRow (std::ostream &stream, const double *pRow, char separator= ',', const char *missing="?") const |
| Print a single row of data in ARFF format. More...
|
|
void | save (const GMatrix *pData, const char *szFilename) const |
| Saves to a file. More...
|
|