|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwpi.associations.arminerSequence.DBReader
A DBReader is used to read data from a database.
Field Summary | |
private ARMinerItemset[] |
attribute_itemset
An array of Itemsets to pass back to WEKA if one or more attributes are required |
private int |
current_instance
Current instance index |
private weka.core.Instances |
instances
The instances passed by WEKA |
private java.util.Hashtable |
number_hash
A hashtable of Attribute=Value strings, indexed on item ID Integers. |
private static java.lang.String |
SET_DELIMETERS
These are the characters to use in a set { and } are included for the beginning and the end, but could be used as delimeters if someone really wanted to. |
private java.util.Hashtable |
value_hash
A hashtable of item ID Integers, indexed on Attribute=Value strings |
Constructor Summary | |
DBReader(weka.core.Instances instances)
Loads a WEKA Instances object and sets the valid items |
Method Summary | |
ARMinerItemset |
getAttributeItemset(int i)
Function to return an ARMinerItemset containing all items in a particular attribute. |
ARMinerItemset |
getFirstRow()
Function to return the first instance as an ARMinerItemset |
ARMinerItemset |
getNextRow()
Function to return the instance at current_instance as an ARMinerItemset |
java.util.Hashtable |
getNumberHash()
Function to return the item ID Integer to Attribute=Value string hashtable for use in translating back from from numbers to strings by WEKA. |
long |
getNumColumns()
Function to return the number of columns (attribute value items) |
long |
getNumRows()
Function to return the number of rows (instances) |
boolean |
hasMoreRows()
Function to check if there are more rows (instances) |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.Hashtable value_hash
private java.util.Hashtable number_hash
private weka.core.Instances instances
private int current_instance
private ARMinerItemset[] attribute_itemset
private static java.lang.String SET_DELIMETERS
Constructor Detail |
public DBReader(weka.core.Instances instances) throws weka.core.UnsupportedAttributeTypeException
instances
- the instances to read itemsets from
exception
- if the instances contain a numeric attribute
weka.core.UnsupportedAttributeTypeException
Method Detail |
public long getNumRows()
public long getNumColumns()
public ARMinerItemset getFirstRow() throws java.io.IOException
java.io.IOException
public ARMinerItemset getNextRow()
public boolean hasMoreRows()
true
if current_instance < number of instances,
false otherwisepublic java.util.Hashtable getNumberHash()
public ARMinerItemset getAttributeItemset(int i)
i
- the index of the attribute
public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |