程序包 weka.core.xml

类 XMLInstances

java.lang.Object
weka.core.xml.XMLDocument
weka.core.xml.XMLInstances
所有已实现的接口:
Serializable, RevisionHandler

public class XMLInstances extends XMLDocument implements Serializable
XML representation of the Instances class.
版本:
$Revision: 1.4 $
作者:
fracpete (fracpete at waikato dot ac dot nz)
另请参阅:
  • 字段详细资料

    • FILE_EXTENSION

      public static String FILE_EXTENSION
      The filename extension that should be used for xrff files
    • TAG_DATASET

      public static final String TAG_DATASET
      the root element
      另请参阅:
    • TAG_HEADER

      public static final String TAG_HEADER
      the header element
      另请参阅:
    • TAG_BODY

      public static final String TAG_BODY
      the body element
      另请参阅:
    • TAG_NOTES

      public static final String TAG_NOTES
      the notes element
      另请参阅:
    • TAG_ATTRIBUTES

      public static final String TAG_ATTRIBUTES
      the attributes element
      另请参阅:
    • TAG_ATTRIBUTE

      public static final String TAG_ATTRIBUTE
      the attribute element
      另请参阅:
    • TAG_LABELS

      public static final String TAG_LABELS
      the labels element
      另请参阅:
    • TAG_LABEL

      public static final String TAG_LABEL
      the label element
      另请参阅:
    • TAG_METADATA

      public static final String TAG_METADATA
      the meta-data element
      另请参阅:
    • TAG_PROPERTY

      public static final String TAG_PROPERTY
      the property element
      另请参阅:
    • TAG_INSTANCES

      public static final String TAG_INSTANCES
      the data element
      另请参阅:
    • TAG_INSTANCE

      public static final String TAG_INSTANCE
      the instance element
      另请参阅:
    • TAG_VALUE

      public static final String TAG_VALUE
      the value element
      另请参阅:
    • ATT_VERSION

      public static final String ATT_VERSION
      the version attribute
      另请参阅:
    • ATT_TYPE

      public static final String ATT_TYPE
      the type attribute
      另请参阅:
    • ATT_FORMAT

      public static final String ATT_FORMAT
      the format attribute (for date attributes)
      另请参阅:
    • ATT_CLASS

      public static final String ATT_CLASS
      the class attribute
      另请参阅:
    • ATT_INDEX

      public static final String ATT_INDEX
      the index attribute
      另请参阅:
    • ATT_WEIGHT

      public static final String ATT_WEIGHT
      the weight attribute
      另请参阅:
    • ATT_MISSING

      public static final String ATT_MISSING
      the missing attribute
      另请参阅:
    • VAL_NUMERIC

      public static final String VAL_NUMERIC
      the value for numeric
      另请参阅:
    • VAL_DATE

      public static final String VAL_DATE
      the value for date
      另请参阅:
    • VAL_NOMINAL

      public static final String VAL_NOMINAL
      the value for nominal
      另请参阅:
    • VAL_STRING

      public static final String VAL_STRING
      the value for string
      另请参阅:
    • VAL_RELATIONAL

      public static final String VAL_RELATIONAL
      the value for relational
      另请参阅:
    • VAL_NORMAL

      public static final String VAL_NORMAL
      the value for normal
      另请参阅:
    • VAL_SPARSE

      public static final String VAL_SPARSE
      the value for sparse
      另请参阅:
    • DOCTYPE

      public static final String DOCTYPE
      the DTD
  • 构造器详细资料

    • XMLInstances

      public XMLInstances() throws Exception
      the default constructor
      抛出:
      Exception - if XML initialization fails
    • XMLInstances

      public XMLInstances(Instances data) throws Exception
      generates the XML structure based on the given data
      参数:
      data - the data to build the XML structure from
      抛出:
      Exception - if initialization/generation fails
    • XMLInstances

      public XMLInstances(Reader reader) throws Exception
      generates the Instances directly from the reader containing the XML data.
      参数:
      reader - the reader for the XML data
      抛出:
      Exception - if something goes wrong
  • 方法详细资料

    • setInstances

      public void setInstances(Instances data)
      builds up the XML structure based on the given data
      参数:
      data - data to generate the XML from
    • getInstances

      public Instances getInstances()
      returns the current instances, either the ones that were set or the ones that were generated from the XML structure.
      返回:
      the current instances
    • setXML

      public void setXML(Reader reader) throws Exception
      reads the XML structure from the given reader
      参数:
      reader - the reader to get the XML from
      抛出:
      Exception - if
    • getRevision

      public String getRevision()
      Returns the revision string.
      指定者:
      getRevision 在接口中 RevisionHandler
      覆盖:
      getRevision 在类中 XMLDocument
      返回:
      the revision
    • main

      public static void main(String[] args)
      takes an XML document as first argument and then outputs the Instances statistics
      参数:
      args - the commandline options