#include <YaDT.h>
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. | |
subset * | get_wsubset_all () const |
Return new weighted subset for all table rows. | |
subset * | get_wsubset_difference (subset *subtable) const |
Return new weighted subset as difference from a given one. | |
subset * | get_wsubset_first_n (unsigned n) const |
Return new weighted subset for first n table rows. | |
subset * | get_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 table & | operator= (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 table * | fromBinary (const string &filename) |
Binary input. | |
Classes | |
class | subset |
A subset of a table. More... |
A relational table is a collection of attributes (discrete, continuous), of a class and, possibly, of a weights column.
yadt::table::table | ( | const string & | name | ) |
Constructor.
name | table name. |
yadt::table::~table | ( | ) |
Destructor.
yadt::table::table | ( | const table & | ) |
Copy constructor not defined.
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!!
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.
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.
ds | data source | |
unknown | the unknown token |
void yadt::table::load_meta_data | ( | const datasource & | ds | ) | throw (runtime_error) |
Load metadata from a datasource.
ostream* yadt::table::set_log | ( | ostream * | new_log | ) |
Set output log.
Default value is NULL, i.e. no output.
new_log | 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.
newverbosity | new 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!!
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.