yadt::table Class Reference

A relational table. More...

#include <YaDT.h>

List of all members.

Public Member Functions

double get_elapsed () const
 Return elapsed time for lastloading of table.
string get_name () const
 Return table name.
unsigned get_no_columns () const
 Return number of columns in the table.
unsigned get_no_rows () const
 Return number of rows in the table.
subsetget_wsubset_all () const
 Return new weighted subset for all table rows.
subsetget_wsubset_difference (subset *subtable) const
 Return new weighted subset as difference from a given one.
subsetget_wsubset_first_n (unsigned n) const
 Return new weighted subset for first n table rows.
subsetget_wsubset_random (unsigned n) const
 Return new weighted subset for n randomly selected (no repetition) table rows.
void load_data (const datasource &ds, const string &unknown="?") throw (runtime_error)
 Load a table from a datasource.
void load_meta_data (const datasource &ds) throw (runtime_error)
 Load metadata from a datasource.
const tableoperator= (const table &)
 Assignment constructor not defined.
ostream * set_log (ostream *new_log)
 Set output log.
unsigned set_verbosity (unsigned newverbosity)
 Set output log verbosity of operations.
 table (const table &)
 Copy constructor not defined.
 table (const string &name)
 Constructor.
void toBinary (const string &filename) const
 Binary output.
void toXML_data_dictionary (ostream &os=cout) const
 XML output of data dictionary.
void toXML_mining_schema (ostream &os=cout) const
 XML output of mining schema.
 ~table ()
 Destructor.

Static Public Member Functions

static tablefromBinary (const string &filename)
 Binary input.

Classes

class  subset
 A subset of a table. More...


Detailed Description

A relational table.

A relational table is a collection of attributes (discrete, continuous), of a class and, possibly, of a weights column.


Constructor & Destructor Documentation

yadt::table::table ( const string &  name  ) 

Constructor.

Parameters:
name table name.

yadt::table::~table (  ) 

Destructor.

yadt::table::table ( const table  ) 

Copy constructor not defined.


Member Function Documentation

static table* yadt::table::fromBinary ( const string &  filename  )  [static]

Binary input.

Attention: binary input/output is not guarranteed to be consistent among different releases of this library!!

Parameters:
filename the output filename.

double yadt::table::get_elapsed (  )  const

Return elapsed time for lastloading of table.

In other words, this method returns the elapsed time of the last call to the load_data() method.

string yadt::table::get_name (  )  const

Return table name.

unsigned yadt::table::get_no_columns (  )  const

Return number of columns in the table.

unsigned yadt::table::get_no_rows (  )  const

Return number of rows in the table.

subset* yadt::table::get_wsubset_all (  )  const

Return new weighted subset for all table rows.

Weights of cases (i.e., rows) in the returned subset are assigned accordingly to the weights column, if present or to the default value (1.0) otherwise.

subset* yadt::table::get_wsubset_difference ( subset subtable  )  const

Return new weighted subset as difference from a given one.

The returned subset consists of all tables rows not present in the passed subset. Weights of cases (i.e., rows) in the returned w_sequence are assigned accordingly to the weights column, if present or to the default value (1.0) otherwise.

subset* yadt::table::get_wsubset_first_n ( unsigned  n  )  const

Return new weighted subset for first n table rows.

Weights of cases (i.e., rows) in the returned subset are assigned accordingly to the weights column, if present or to the default value (1.0) otherwise.

subset* yadt::table::get_wsubset_random ( unsigned  n  )  const

Return new weighted subset for n randomly selected (no repetition) table rows.

Weights of cases (i.e., rows) in the returned w_sequence are assigned accordingly to the weights column, if present or to the default value (1.0) otherwise.

void yadt::table::load_data ( const datasource ds,
const string &  unknown = "?" 
) throw (runtime_error)

Load a table from a datasource.

Parameters:
ds data source
unknown the unknown token

void yadt::table::load_meta_data ( const datasource ds  )  throw (runtime_error)

Load metadata from a datasource.

const table& yadt::table::operator= ( const table  ) 

Assignment constructor not defined.

ostream* yadt::table::set_log ( ostream *  new_log  ) 

Set output log.

Default value is NULL, i.e. no output.

Parameters:
new_log output log.
Returns:
old output log.

unsigned yadt::table::set_verbosity ( unsigned  newverbosity  ) 

Set output log verbosity of operations.

Verbosity values are: 0 = none, 1 low, 2 normal, 3 high.

Parameters:
newverbosity new verbosity of output.
Returns:
old verbosity of output.

void yadt::table::toBinary ( const string &  filename  )  const

Binary output.

Attention: binary input/output is not guarranteed to be consistent among different releases of this library!!

Parameters:
filename the input filename.

void yadt::table::toXML_data_dictionary ( ostream &  os = cout  )  const

XML output of data dictionary.

PMML 2.0 complaint.

void yadt::table::toXML_mining_schema ( ostream &  os = cout  )  const

XML output of mining schema.

PMML 2.0 complaint.


The documentation for this class was generated from the following file:
Generated on Wed Feb 21 12:23:50 2007 for YaDT by  doxygen 1.5.1-p1