Main Page | Class Hierarchy | Class List | Class Members

kddml.Core.DataSources.InternalTable Class Reference

Inheritance diagram for kddml.Core.DataSources.InternalTable:

kddml.Core.KDDMLObject kddml.Core.DataSources.InternalTableManager kddml.Core.HTMLTranslator kddml.Core.DataSources.PPInternalTable kddml.Core.DataSources.TransactionalInternalTable kddml.Core.DataSources.TimestampInternalTable List of all members.

Public Member Functions

DataStatisticsManager getStatistic ()
KDDMLObjectType getType ()
int getDimension ()
String toString ()
void saveToRepository () throws KDDMLCoreException
boolean isEmpty ()
Object load (long i) throws InternalTableException
boolean isTransactionalTable ()
boolean isTimestampTable ()
void addInstances (Object inst) throws InternalTableException
boolean hasNext ()
void reset () throws InternalTableException
void increasePointer (int i) throws InternalTableException
long optimize ()
void saveHTML () throws KDDMLCoreException
int getNumOfInstances ()
int getNumOfAttributes ()

Static Public Attributes

static final int ALL = -1

Detailed Description

This object is used to represent relational data sources. An internal table is composed by

  1. the data schema, that includes attributes types and some simple statistics on attribute values;
  2. the physical data as a text file in comma separated format.

Physical data can occur in several forms: relational table, transactional table, and timestamp table. In the relational format, each column of the data corresponds to a logical attribute, e.g., temperature, play tennis. Each row of the data corresponds to an individual case (transaction) to be considered during mining. This data format is also known as single-record case table. Sparse data are more effectively stored in a transactional format. Here, data that have a variable number of entries (or items) from among many possible ones can be stored more compactly, since only the items present are stored in the table. A transactional table (also known as multi-record case table) has an attribute transaction identifying the transaction and an attribute event containing the single item. Transactions are ordered with respect to the attribute transaction. Other columns are allowed in the table (e.g., the price or quantity of items for each transaction), but they can be ignored by the operator, depending on the context. This representation is typically used for association rules. Timestamp format is similar to a transactional table, but with an extra attribute timestamp. This attribute defines a partial time order between transactions and items. Typically, this format is used for sequential patterns analysis.
InternalTable class is used to represent relational tables.
This class can be istantied only using the factory classes of the package. It uses the weka.Core.* package as representation of single instances.

Title: KDDML-MQL

Description: Knowledge Discovery in Database Environment

Copyright: Copyright (c) 2003-2005

Company: Universita' di Pisa - Dipartimento di Informatica

Author:
Andrea Romei (romei@di.unipi.it)
Version:
2.0.16


Member Function Documentation

DataStatisticsManager kddml.Core.DataSources.InternalTable.getStatistic  ) 
 

Returns the statistics related to this table.

Returns:
InternalTableManager.

Implements kddml.Core.DataSources.InternalTableManager.

KDDMLObjectType kddml.Core.DataSources.InternalTable.getType  )  [virtual]
 

Returns the type of this object.

Returns:
KDDMLObjectType

Implements kddml.Core.KDDMLObject.

Reimplemented in kddml.Core.DataSources.PPInternalTable.

int kddml.Core.DataSources.InternalTable.getDimension  ) 
 

Returns the table dimension in KBytes.

Returns:
int

Implements kddml.Core.DataSources.InternalTableManager.

String kddml.Core.DataSources.InternalTable.toString  ) 
 

Returns a representation of this table as string.

Returns:
String

Reimplemented in kddml.Core.DataSources.PPInternalTable.

void kddml.Core.DataSources.InternalTable.saveToRepository  )  throws KDDMLCoreException [virtual]
 

Saves the object in the system repository. The data schema is representend as XML document. The physical instances as text file in comma separated format. The destination path is provided by the object_path variable for the data schema and by the object_data_path variable for the row data. By definition, row data is already stored in the repository.

Exceptions:
KDDMLCoreException 

Implements kddml.Core.KDDMLObject.

Reimplemented in kddml.Core.DataSources.PPInternalTable.

boolean kddml.Core.DataSources.InternalTable.isEmpty  )  [virtual]
 

Tests if the table contains instances.

Returns:
boolean

Implements kddml.Core.KDDMLObject.

Object kddml.Core.DataSources.InternalTable.load long  i  )  throws InternalTableException
 

Loads i instances from the position specified by the pointer and returns they as generic object. If the input parameter is greater than the total number of instances, or if it is equal to -1, then the method returns all instances. If i is equal to 0, it returns only the schema of tuples.

Parameters:
i long a non-negative integer representing the the number of instances that will be stored in RAM. -1 if all instances must be return.
Exceptions:
KDDMLCoreException 
Returns:
Object the set of instances as weka.core.Instances.
Exceptions:
InternalTableException 

Implements kddml.Core.DataSources.InternalTableManager.

Reimplemented in kddml.Core.DataSources.PPInternalTable.

boolean kddml.Core.DataSources.InternalTable.isTransactionalTable  ) 
 

Returns true if the table is a transactional table with attributes transaction and event. Returns false if the table is a relational table.

Returns:
boolean

Implements kddml.Core.DataSources.InternalTableManager.

Reimplemented in kddml.Core.DataSources.TransactionalInternalTable.

boolean kddml.Core.DataSources.InternalTable.isTimestampTable  ) 
 

Returns true if the table is a timestamp table with attributes transaction, event and timestamp.

Returns:
boolean

Implements kddml.Core.DataSources.InternalTableManager.

Reimplemented in kddml.Core.DataSources.TimestampInternalTable.

void kddml.Core.DataSources.InternalTable.addInstances Object  inst  )  throws InternalTableException
 

Adds the input instances to the table. Throws an exception if the data schema of the input table and the data schema of the input instances are not compatible.

Parameters:
inst Object the set of instances as weka.core.Instances.
Exceptions:
InternalTableException if the schemas are not compatibles.

Implements kddml.Core.DataSources.InternalTableManager.

boolean kddml.Core.DataSources.InternalTable.hasNext  ) 
 

Tests if there are instances to load.

Returns:
boolean returns true if there are instances to load. Returns false if the pointer is at the end of the data file.

Implements kddml.Core.DataSources.InternalTableManager.

void kddml.Core.DataSources.InternalTable.reset  )  throws InternalTableException
 

Initializes the instances pointer to the begin of data file.

Exceptions:
InternalTableException 

Implements kddml.Core.DataSources.InternalTableManager.

Reimplemented in kddml.Core.DataSources.PPInternalTable.

void kddml.Core.DataSources.InternalTable.increasePointer int  i  )  throws InternalTableException
 

Increases the instances pointer of the specified quantity.

Parameters:
i int
Exceptions:
InternalTableException 

Reimplemented in kddml.Core.DataSources.PPInternalTable.

long kddml.Core.DataSources.InternalTable.optimize  ) 
 

Computes the optimal number of instances to import in RAM. It can depend from the total number of instances and attributes and the quantity of available system RAM.

Returns:
long

Implements kddml.Core.DataSources.InternalTableManager.

Reimplemented in kddml.Core.DataSources.PPInternalTable.

void kddml.Core.DataSources.InternalTable.saveHTML  )  throws KDDMLCoreException [virtual]
 

Saves the instances in the system repository as HTML document.

Exceptions:
KDDMLCoreException 

Implements kddml.Core.HTMLTranslator.

Reimplemented in kddml.Core.DataSources.PPInternalTable.

int kddml.Core.DataSources.InternalTable.getNumOfInstances  ) 
 

Returns the total number of instances.

Returns:
int

Implements kddml.Core.DataSources.InternalTableManager.

int kddml.Core.DataSources.InternalTable.getNumOfAttributes  ) 
 

Returns the total number of attributes.

Returns:
int

Implements kddml.Core.DataSources.InternalTableManager.


Member Data Documentation

final int kddml.Core.DataSources.InternalTable.ALL = -1 [static]
 

All instaces loaded in RAM.


Generated on Thu Feb 23 13:04:43 2006 for kddml by  doxygen 1.4.3