#include <InputTargetDataSet.h>
Definition at line 30 of file InputTargetDataSet.h.
Flood::InputTargetDataSet::InputTargetDataSet | ( | int | new_instances_number, | |
int | new_input_variables_number, | |||
int | new_target_variables_number | |||
) | [explicit] |
Instances number, input variables number and target variables number constructor. It creates an input-target data set object with given instances and input and target variables numbers. It also initializes the rest of class members to their default values.
new_instances_number | Number of instances in the data set. | |
new_input_variables_number | Number of input variables. | |
new_target_variables_number | Number of target variables. |
Definition at line 42 of file InputTargetDataSet.cpp.
Flood::InputTargetDataSet::InputTargetDataSet | ( | int | new_instances_number, | |
int | new_variables_number | |||
) | [explicit] |
Instances number, input variables number and target variables number constructor. It creates an input-target data set object with given instances and variables numbers. All the variables are set as input. It also initializes the rest of class members to their default values.
new_instances_number | Number of instances in the data set. | |
new_variables_number | Number of variables. |
Definition at line 57 of file InputTargetDataSet.cpp.
Flood::InputTargetDataSet::InputTargetDataSet | ( | void | ) | [explicit] |
Default constructor. It creates an input-target data set object with zero instances and zero input and target variables. It also initializes the rest of class members to their default values.
Definition at line 69 of file InputTargetDataSet.cpp.
Flood::InputTargetDataSet::InputTargetDataSet | ( | const InputTargetDataSet & | other_input_target_data_set | ) |
Copy constructor. It creates a copy of an existing input target data set object.
other_input_target_data_set | Input-target data set object to be copied. |
Definition at line 94 of file InputTargetDataSet.cpp.
Flood::InputTargetDataSet::InputTargetDataSet | ( | const char * | filename | ) | [explicit] |
File constructor. It creates an input-target data set object by loading the object members from a XML-type file. Please mind about the file format. This is specified in the User's Guide.
filename | Input-target data set file name. |
Definition at line 81 of file InputTargetDataSet.cpp.
Flood::InputTargetDataSet::~InputTargetDataSet | ( | void | ) | [virtual] |
void Flood::InputTargetDataSet::add_instance | ( | const Vector< double > & | instance | ) |
This method adds a new instance to the data matrix from a vector of real numbers. The size of that vector must be equal to the number of variables. Note that resizing is here necessary and therefore computationally expensive. All instances are also set for training.
instance | Input and target values of the instance to be added. |
Definition at line 2459 of file InputTargetDataSet.cpp.
This method returns a vector of vectors containing some basic statistics of all the variables in the data set. The size of this vector is four. The subvectors are:
Definition at line 2536 of file InputTargetDataSet.cpp.
This method returns a vector of vectors with some basic statistics of the input variables on all instances. The size of this vector is four. The subvectors are:
Definition at line 2694 of file InputTargetDataSet.cpp.
This method returns a vector of vectors containing some basic statistics of all variables on all data, training, validation and testing instances. The size of this vector is twelve. The subvectors are:
Definition at line 2672 of file InputTargetDataSet.cpp.
Vector< Vector< double > > Flood::InputTargetDataSet::calculate_target_variables_statistics | ( | void | ) |
This method returns a vector of vectors with some basic statistics of the target variables on all instances. The size of this vector is four. The subvectors are:
Definition at line 2721 of file InputTargetDataSet.cpp.
Vector< Vector< double > > Flood::InputTargetDataSet::calculate_testing_instances_statistics | ( | void | ) |
This method returns a vector of vectors containing some basic statistics of all variables on the testing instances. The size of this vector is four. The subvectors are:
Definition at line 2627 of file InputTargetDataSet.cpp.
Vector< Vector< double > > Flood::InputTargetDataSet::calculate_training_instances_statistics | ( | void | ) |
This method returns a vector of vectors containing some basic statistics of all variables on the training instances. The size of this vector is four. The subvectors are:
Definition at line 2563 of file InputTargetDataSet.cpp.
Vector< double > Flood::InputTargetDataSet::calculate_training_target_data_mean | ( | void | ) |
This method returns the mean values of the target variables on the training instances.
Definition at line 2784 of file InputTargetDataSet.cpp.
Vector< Vector< double > > Flood::InputTargetDataSet::calculate_validation_instances_statistics | ( | void | ) |
This method returns a vector of vectors containing some basic statistics of all variables on the validation instances. The size of this vector is four. The subvectors are:
Definition at line 2595 of file InputTargetDataSet.cpp.
Vector< double > Flood::InputTargetDataSet::calculate_validation_target_data_mean | ( | void | ) |
This method returns the mean values of the target variables on the validation instances.
Definition at line 2796 of file InputTargetDataSet.cpp.
This method returns a vector of vectors with some basic statistics of the input and target variables on all instances. The size of this vector is eight. The subvectors are:
Definition at line 2753 of file InputTargetDataSet.cpp.
Matrix< double > & Flood::InputTargetDataSet::get_data | ( | void | ) |
This method returns a reference to the data matrix in the input-target data set. The number of rows is equal to the number of instances. The number of columns is equal to the number of variables.
Definition at line 654 of file InputTargetDataSet.cpp.
std::string Flood::InputTargetDataSet::get_data_statistics_XML | ( | bool | show_declaration | ) |
This method returns a XML-type formated string with the basic statistics of the data matrix.
show_declaration | True if an XML-type declaration is to be included at the beginning. |
Definition at line 4924 of file InputTargetDataSet.cpp.
bool Flood::InputTargetDataSet::get_display | ( | void | ) |
This method returns true if messages from this class can be displayed on the screen, or false if messages from this class can't be displayed on the screen.
Definition at line 642 of file InputTargetDataSet.cpp.
Matrix< double > Flood::InputTargetDataSet::get_input_data | ( | void | ) |
This method returns a matrix with the input variables in the input-target data set. The number of rows is the number of instances. The number of columns is the number of input variables.
Definition at line 714 of file InputTargetDataSet.cpp.
Vector< double > Flood::InputTargetDataSet::get_input_instance | ( | int | instance_index | ) |
This method returns a vector with the input values of a single instance in the data set.
instance_index | Index of the instance. |
Definition at line 977 of file InputTargetDataSet.cpp.
Vector< std::string > Flood::InputTargetDataSet::get_input_variables_description | ( | void | ) |
This method returns the description of the input variables in the data set.
Definition at line 492 of file InputTargetDataSet.cpp.
Vector< int > & Flood::InputTargetDataSet::get_input_variables_indices | ( | void | ) |
This method returns the indices of the input variables.
Definition at line 218 of file InputTargetDataSet.cpp.
Vector< std::string > Flood::InputTargetDataSet::get_input_variables_name | ( | void | ) |
This method returns the names of the input variables in the data set.
Definition at line 284 of file InputTargetDataSet.cpp.
int Flood::InputTargetDataSet::get_input_variables_number | ( | void | ) | [inline] |
This method returns the number of input variables of the input-target data set.
Definition at line 104 of file InputTargetDataSet.h.
Vector< std::string > Flood::InputTargetDataSet::get_input_variables_units | ( | void | ) |
This method returns the units of the input variables in the data set.
Definition at line 388 of file InputTargetDataSet.cpp.
Vector< double > Flood::InputTargetDataSet::get_instance | ( | int | i | ) |
This method returns the input and target values of a single instance in the input-target data set.
i | Index of the instance. |
Definition at line 817 of file InputTargetDataSet.cpp.
std::string Flood::InputTargetDataSet::get_instances_information_XML | ( | bool | show_declaration | ) |
This method returns a string with XML-type format with information about the training, validation and testing subsets.
show_declaration | True if an XML-type declaration is to be included at the beginning. |
Definition at line 4659 of file InputTargetDataSet.cpp.
int Flood::InputTargetDataSet::get_instances_number | ( | void | ) | [inline] |
This method returns the number of instances in the input-target data set.
Definition at line 69 of file InputTargetDataSet.h.
std::string Flood::InputTargetDataSet::get_instances_statistics_XML | ( | bool | show_declaration | ) |
This method returns a XML-type formated string with the basic statistics of the whole data and the training, validation and testing instances in the data matrix.
show_declaration | True if an XML-type declaration is to be included at the beginning. |
Definition at line 5216 of file InputTargetDataSet.cpp.
Matrix< double > Flood::InputTargetDataSet::get_target_data | ( | void | ) |
This method returns a matrix with the target variables in the input-target data set. The number of rows is the number of instances. The number of columns is the number of target variables.
Definition at line 730 of file InputTargetDataSet.cpp.
Vector< double > Flood::InputTargetDataSet::get_target_instance | ( | int | instance_index | ) |
This method returns a vector with the target values of a single instance in the data set.
instance_index | Index of the instance. |
Definition at line 1026 of file InputTargetDataSet.cpp.
Vector< std::string > Flood::InputTargetDataSet::get_target_variables_description | ( | void | ) |
This method returns the description of the target variables in the data set.
Definition at line 520 of file InputTargetDataSet.cpp.
Vector< int > & Flood::InputTargetDataSet::get_target_variables_indices | ( | void | ) |
Vector<int>& get_target_variables_indices(void) method.
Definition at line 228 of file InputTargetDataSet.cpp.
Vector< std::string > Flood::InputTargetDataSet::get_target_variables_name | ( | void | ) |
This method returns the names of the target variables in the data set.
Definition at line 313 of file InputTargetDataSet.cpp.
int Flood::InputTargetDataSet::get_target_variables_number | ( | void | ) | [inline] |
This method returns the number of target variables of the input-target data set.
Definition at line 111 of file InputTargetDataSet.h.
Vector< std::string > Flood::InputTargetDataSet::get_target_variables_units | ( | void | ) |
This method returns the units of the target variables in the data set.
Definition at line 417 of file InputTargetDataSet.cpp.
Matrix< double > Flood::InputTargetDataSet::get_testing_data | ( | void | ) |
This method returns a matrix with the testing instances in the input-target data set. The number of rows is the number of testing instances. The number of columns is the number of variables.
Definition at line 698 of file InputTargetDataSet.cpp.
Matrix< double > Flood::InputTargetDataSet::get_testing_input_data | ( | void | ) |
This method returns a matrix with testing instances and input variables. The number of rows is the number of testing instances. The number of columns is the number of input variables.
Definition at line 794 of file InputTargetDataSet.cpp.
Vector< double > Flood::InputTargetDataSet::get_testing_input_instance | ( | int | testing_instance_index | ) |
This method returns the input values of a given testing instance.
testing_instance_index | Index of testing instance. |
Definition at line 1153 of file InputTargetDataSet.cpp.
Vector< double > Flood::InputTargetDataSet::get_testing_instance | ( | int | testing_instance_index | ) |
This method returns the input and target values of a single testing instance in the input-target data set.
testing_instance_index | Index of the testing instance. |
Definition at line 937 of file InputTargetDataSet.cpp.
Vector< int > & Flood::InputTargetDataSet::get_testing_instances_indices | ( | void | ) |
This method returns the indices of the instances which will be used for testing.
Definition at line 208 of file InputTargetDataSet.cpp.
int Flood::InputTargetDataSet::get_testing_instances_number | ( | void | ) | [inline] |
This method returns the number of instances in the data set which will be used for testing.
Definition at line 90 of file InputTargetDataSet.h.
std::string Flood::InputTargetDataSet::get_testing_instances_statistics_XML | ( | bool | show_declaration | ) |
This method returns a XML-type formated string with the basic statistics of the testing instances in the data matrix.
show_declaration | True if an XML-type declaration is to be included at the beginning. |
Definition at line 5143 of file InputTargetDataSet.cpp.
Matrix< double > Flood::InputTargetDataSet::get_testing_target_data | ( | void | ) |
This method returns a matrix with testing instances and target variables. The number of rows is the number of testing instances. The number of columns is the number of target variables.
Definition at line 806 of file InputTargetDataSet.cpp.
Vector< double > Flood::InputTargetDataSet::get_testing_target_instance | ( | int | testing_instance_index | ) |
This method returns the target values of a given testing instance.
testing_instance_index | Index of testing instance. |
Definition at line 1267 of file InputTargetDataSet.cpp.
Matrix< double > Flood::InputTargetDataSet::get_training_data | ( | void | ) |
This method returns a matrix with the training instances in the input-target data set. The number of rows is the number of training instances. The number of columns is the number of variables.
Definition at line 666 of file InputTargetDataSet.cpp.
Matrix< double > Flood::InputTargetDataSet::get_training_input_data | ( | void | ) |
This method returns a matrix with training instances and input variables. The number of rows is the number of training instances. The number of columns is the number of input variables.
Definition at line 746 of file InputTargetDataSet.cpp.
Vector< double > Flood::InputTargetDataSet::get_training_input_instance | ( | int | training_instance_index | ) |
This method returns the input values of a given training instance.
training_instance_index | Index of training instance. |
Definition at line 1077 of file InputTargetDataSet.cpp.
Vector< double > Flood::InputTargetDataSet::get_training_instance | ( | int | training_instance_index | ) |
This method returns the input and target values of a single training instance in the input-target data set.
training_instance_index | Index of the training instance. |
Definition at line 857 of file InputTargetDataSet.cpp.
Vector< int > & Flood::InputTargetDataSet::get_training_instances_indices | ( | void | ) |
This method returns the indices of the instances which will be used for training.
Definition at line 188 of file InputTargetDataSet.cpp.
int Flood::InputTargetDataSet::get_training_instances_number | ( | void | ) | [inline] |
This method returns the number of instances in the data set which will be used for training.
Definition at line 76 of file InputTargetDataSet.h.
std::string Flood::InputTargetDataSet::get_training_instances_statistics_XML | ( | bool | show_declaration | ) |
This method returns a XML-type formated string with the basic statistics of the training instances in the data matrix.
show_declaration | True if an XML-type declaration is to be included at the beginning. |
Definition at line 5002 of file InputTargetDataSet.cpp.
Matrix< double > Flood::InputTargetDataSet::get_training_target_data | ( | void | ) |
This method returns a matrix with training instances and target variables. The number of rows is the number of training instances. The number of columns is the number of target variables.
Definition at line 758 of file InputTargetDataSet.cpp.
Vector< double > Flood::InputTargetDataSet::get_training_target_instance | ( | int | training_instance_index | ) |
This method returns the target values of a given training instance.
training_instance_index | Index of training instance. |
Definition at line 1191 of file InputTargetDataSet.cpp.
Matrix< double > Flood::InputTargetDataSet::get_validation_data | ( | void | ) |
This method returns a matrix with the validation instances in the input-target data set. The number of rows is the number of validation instances. The number of columns is the number of variables.
Definition at line 682 of file InputTargetDataSet.cpp.
Matrix< double > Flood::InputTargetDataSet::get_validation_input_data | ( | void | ) |
This method returns a matrix with validation instances and input variables. The number of rows is the number of validation instances. The number of columns is the number of input variables.
Definition at line 770 of file InputTargetDataSet.cpp.
Vector< double > Flood::InputTargetDataSet::get_validation_input_instance | ( | int | validation_instance_index | ) |
This method returns the input values of a given validation instance.
validation_instance_index | Index of validation instance. |
Definition at line 1115 of file InputTargetDataSet.cpp.
Vector< double > Flood::InputTargetDataSet::get_validation_instance | ( | int | validation_instance_index | ) |
This method returns the input and target values of a single validation instance in the input-target data set.
validation_instance_index | Index of the validation instance. |
Definition at line 897 of file InputTargetDataSet.cpp.
Vector< int > & Flood::InputTargetDataSet::get_validation_instances_indices | ( | void | ) |
This method returns the indices of the instances which will be used for validation.
Definition at line 198 of file InputTargetDataSet.cpp.
int Flood::InputTargetDataSet::get_validation_instances_number | ( | void | ) | [inline] |
This method returns the number of instances in the data set which will be used for validation.
Definition at line 83 of file InputTargetDataSet.h.
std::string Flood::InputTargetDataSet::get_validation_instances_statistics_XML | ( | bool | show_declaration | ) |
This method returns a XML-type formated string with the basic statistics of the validation instances in the data matrix.
show_declaration | True if an XML-type declaration is to be included at the beginning. |
Definition at line 5071 of file InputTargetDataSet.cpp.
Matrix< double > Flood::InputTargetDataSet::get_validation_target_data | ( | void | ) |
This method returns a matrix with validation instances and target variables. The number of rows is the number of validation instances. The number of columns is the number of target variables.
Definition at line 782 of file InputTargetDataSet.cpp.
Vector< double > Flood::InputTargetDataSet::get_validation_target_instance | ( | int | validation_instance_index | ) |
This method returns the target values of a given validation instance.
validation_instance_index | Index of validation instance. |
Definition at line 1229 of file InputTargetDataSet.cpp.
std::string & Flood::InputTargetDataSet::get_variable_description | ( | int | i | ) |
This method returns the description of a single variable in the data set.
i | Index of variable. |
Definition at line 457 of file InputTargetDataSet.cpp.
std::string & Flood::InputTargetDataSet::get_variable_name | ( | int | i | ) |
This method returns the name of a single variable in the data set.
i | Index of variable. |
Definition at line 249 of file InputTargetDataSet.cpp.
std::string & Flood::InputTargetDataSet::get_variable_units | ( | int | i | ) |
This method returns the units of a single variable in the data set.
i | Index of variable. |
Definition at line 353 of file InputTargetDataSet.cpp.
Vector< std::string > & Flood::InputTargetDataSet::get_variables_description | ( | void | ) |
This method returns the description of all the variables in the data set.
Definition at line 446 of file InputTargetDataSet.cpp.
This method returns a vector of vectors with the input and target variables information. The size of this vector is six. The contents of each element are:
Definition at line 559 of file InputTargetDataSet.cpp.
std::string Flood::InputTargetDataSet::get_variables_information_XML | ( | bool | show_declaration | ) |
This method returns a XML-type string with information concerned about the variables in the data set.
show_declaration | True if an XML-type declaration is to be included at the beginning. |
Definition at line 4779 of file InputTargetDataSet.cpp.
Vector< std::string > & Flood::InputTargetDataSet::get_variables_name | ( | void | ) |
This method returns the names of all the variables in the data set.
Definition at line 238 of file InputTargetDataSet.cpp.
int Flood::InputTargetDataSet::get_variables_number | ( | void | ) | [inline] |
This method returns the total number of variables in the input-target data set.
Definition at line 97 of file InputTargetDataSet.h.
Vector< std::string > & Flood::InputTargetDataSet::get_variables_units | ( | void | ) |
This method returns the units of all the variables in the data set.
Definition at line 342 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::initialize_data | ( | double | new_value | ) |
This methods initializes the data matrix with a given value.
new_value | Initialization value. |
Definition at line 3685 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::load | ( | const char * | filename | ) |
This method loads the members of an input-target data set object from a XML-type file:
filename | Name of input-target data set XML-type file. |
Definition at line 3931 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::load_data | ( | const char * | filename | ) |
This method loads from a file the values of the data matrix. The number of rows must be equal to the number of instances. The number of columns must be equal to the number of variables.
Definition at line 4505 of file InputTargetDataSet.cpp.
InputTargetDataSet & Flood::InputTargetDataSet::operator= | ( | const InputTargetDataSet & | other_input_target_data_set | ) |
Assignment operator. It assigns to the current object the members of an existing input-target data set object.
other_input_target_data_set | Input-target data set object to be assigned. |
Definition at line 148 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::print | ( | void | ) |
This method prints to the screen in a XML-type format the members of the input-target data set object.
Definition at line 3867 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::print_data | ( | void | ) |
This method prints to the sceen the values of the data matrix.
Definition at line 4461 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::print_data_statistics | ( | void | ) |
This method prints to the screen in a XML-type format the basic statistics of the data matrix.
Definition at line 4958 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::print_instances_information | ( | void | ) |
This method prints to the sceen in XML-type format the information about the training, validation and testing subsets.
Definition at line 4737 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::print_instances_statistics | ( | void | ) |
This method prints to the screen in a XML-type format the basic statistics of the whole data and the training, validation and testing instances in the data matrix.
Definition at line 5239 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::print_testing_instances_statistics | ( | void | ) |
This method prints to the screen in a XML-type format the basic statistics of the testing instances in the data matrix.
Definition at line 5175 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::print_training_instances_statistics | ( | void | ) |
This method prints to the screen in a XML-type format the basic statistics of the training instances in the data matrix.
Definition at line 5034 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::print_validation_instances_statistics | ( | void | ) |
This method prints to the screen in a XML-type format the basic statistics of the validation instances in the data matrix.
Definition at line 5103 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::print_variables_information | ( | void | ) |
This method prints to the screen in a XML-type format information concerned about the variables in the data set.
Definition at line 4880 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::save | ( | const char * | filename | ) |
This method saves the members of an input-target data set object to a XML-type file in an XML-type format.
filename | Name of input-target data set XML-type file. |
Definition at line 3881 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::save_data | ( | const char * | filename | ) |
This method saves to a file the values of the data matrix.
filename | Name of data file. |
Definition at line 4472 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::save_data_statistics | ( | const char * | filename | ) |
This method saves to a XML-type file the basic statistics of the data matrix.
filename | Name of XML-type statistics file. |
Definition at line 4972 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::save_instances_information | ( | const char * | filename | ) |
This method saves to a XML-type file the information about the training, validation and testing subsets.
filename | Name of instances information XML-type file. |
Definition at line 4748 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::save_instances_statistics | ( | const char * | filename | ) |
This method saves to a XML-type file the basic statistics of the whole data and the training, validation and testing instances in the data matrix.
Definition at line 5250 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::save_testing_instances_statistics | ( | const char * | filename | ) |
This method saves to a XML-type file the basic statistics of the testing instances in the data matrix.
filename | Name of XML-type testing instances statistics file. |
Definition at line 5189 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::save_training_instances_statistics | ( | const char * | filename | ) |
This method saves to a XML-type file the basic statistics of the training instances in the data matrix.
filename | Name of XML-type training instances statistics file. |
Definition at line 5045 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::save_validation_instances_statistics | ( | const char * | filename | ) |
This method saves to a XML-type file the basic statistics of the validation instances in the data matrix.
filename | Name of XML-type validation instances statistics file. |
Definition at line 5117 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::save_variables_information | ( | const char * | filename | ) |
This method saves to a XML-type file with information concerned about the variables in the data set.
filename | Name of variables information XML-type file. |
Definition at line 4894 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::scale_data_mean_standard_deviation | ( | const Vector< double > & | variables_mean, | |
const Vector< double > & | variables_standard_deviation | |||
) |
This method scales the data matrix with given mean and standard deviation values. It updates the data matrix.
variables_mean | Mean of variables. | |
variables_standard_deviation | Standard deviation of variables. |
Definition at line 2812 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::scale_data_minimum_maximum | ( | const Vector< double > & | variables_minimum, | |
const Vector< double > & | variables_maximum | |||
) |
This method scales the data matrix with given minimum and maximum values. It updates the data matrix.
variables_minimum | Minimum of variables. | |
variables_maximum | Maximum of variables. |
Definition at line 2855 of file InputTargetDataSet.cpp.
Vector< Vector< double > > Flood::InputTargetDataSet::scale_input_variables_mean_standard_deviation | ( | void | ) |
This method scales the input variables with the calculated mean and standard deviation values from the data matrix. It updates the input variables of the data matrix. It also returns a vector of vectors with the basic statistics of the input and target variables.
Definition at line 2979 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::scale_input_variables_mean_standard_deviation | ( | const Vector< double > & | input_variables_mean, | |
const Vector< double > & | input_variables_standard_deviation | |||
) |
This method scales the input variables with given mean and standard deviation values. It updates the input variables of the data matrix.
input_variables_mean | Mean values for the input variables to be used for scaling. | |
input_variables_standard_deviation | Standard deviation values for the input variables to be used for scaling. |
Definition at line 2898 of file InputTargetDataSet.cpp.
Vector< Vector< double > > Flood::InputTargetDataSet::scale_input_variables_minimum_maximum | ( | void | ) |
This method scales the input variables with the calculated minimum and maximum values from the data matrix. It updates the input variables of the data matrix. It also returns a vector of vectors with the basic statistics of the input and target variables.
Definition at line 3050 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::scale_input_variables_minimum_maximum | ( | const Vector< double > & | input_variables_minimum, | |
const Vector< double > & | input_variables_maximum | |||
) |
This method scales the input variables with given minimum and maximum values. It updates the input variables of the data matrix.
input_variables_minimum | Minimum values for the input variables to be used for scaling. | |
input_variables_maximum | Maximum values for the input variables to be used for scaling. |
Definition at line 2998 of file InputTargetDataSet.cpp.
Vector< Vector< double > > Flood::InputTargetDataSet::scale_target_variables_mean_standard_deviation | ( | void | ) |
This method scales the target variables with the calculated mean and standard deviation values from the data matrix. It updates the target variables of the data matrix. It also returns a vector of vectors with the basic statistics of the input and target variables.
Definition at line 3149 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::scale_target_variables_mean_standard_deviation | ( | const Vector< double > & | target_variables_mean, | |
const Vector< double > & | target_variables_standard_deviation | |||
) |
This method scales the target variables with given mean and standard deviation values. It updates the target variables of the data matrix.
target_variables_mean | Mean values for the target variables to be used for scaling. | |
target_variables_standard_deviation | Standard deviation values for the target variables to be used for scaling. |
Definition at line 3068 of file InputTargetDataSet.cpp.
Vector< Vector< double > > Flood::InputTargetDataSet::scale_target_variables_minimum_maximum | ( | void | ) |
This method scales the target variables with the calculated minimum and maximum values from the data matrix. It updates the target variables of the data matrix. It also returns a vector of vectors with the basic statistics of the input and target variables.
Definition at line 3220 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::scale_target_variables_minimum_maximum | ( | const Vector< double > & | target_variables_minimum, | |
const Vector< double > & | target_variables_maximum | |||
) |
This method scales the target variables with given minimum and maximum values. It updates the target variables of the data matrix.
target_variables_minimum | Minimum values for the target variables to be used for scaling. | |
target_variables_maximum | Maximum values for the target variables to be used for scaling. |
Definition at line 3167 of file InputTargetDataSet.cpp.
Vector< Vector< double > > Flood::InputTargetDataSet::scale_variables_mean_standard_deviation | ( | void | ) |
This method scales the input and the target variables with the mean and standard deviation values calculated from the data matrix. It updates the input and target variables of the data. It also returns the vector of vectors containing the computed statistics of the input-target data set:
Definition at line 3311 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::scale_variables_mean_standard_deviation | ( | const Vector< Vector< double > > | variables_statistics | ) |
This method scales the input and the target variables with given mean and standard deviation values. Please note that it takes as argument a vector of vectors of all basic statistics, with size eight. It updates the input and the target variables of the data matrix.
variables_statistics | Statistics for the input and target variables to be used for scaling. |
Definition at line 3238 of file InputTargetDataSet.cpp.
This method scales the input and the target variables with the minumum and maximum values calculated from the data matrix. It updates the input and target variables of the data. It also returns the vector of vectors containing the computed statistics of the input-target data set:
Definition at line 3402 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::scale_variables_minimum_maximum | ( | const Vector< Vector< double > > | variables_statistics | ) |
This method scales the input and the target variables with given minimum and maximum values. Please note that it takes as argument a vector of vectors of all basic statistics, with size eight. It updates the input and the target variables of the data matrix.
variables_statistics | Statistics for the input target variables to be used for scaling. |
Definition at line 3329 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set | ( | int | new_instances_number, | |
int | new_input_variables_number, | |||
int | new_target_variables_number | |||
) |
This method sets new numbers of instances and input and target variables in the input-target data set. All the instances are set for training. The variables in the data set are the number of inputs plus the number of targets. The first variables in the data matrix correspond to the input variables. The last variables in the data matrix correspond to the target variables.
new_instances_number | Number of instances. | |
new_input_variables_number | Number of input variables. | |
new_target_variables_number | Number of target variables. |
Definition at line 1349 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set | ( | int | new_instances_number, | |
int | new_variables_number | |||
) |
This method sets new numbers of instances and variables in the input target data set. All the instances are set for training. All the variables are set as input.
new_instances_number | Number of instances. | |
new_variables_number | Number of variables. |
Definition at line 1318 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set | ( | void | ) |
This method sets zero instances and zero variables in the input-target data set.
Definition at line 1304 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_data | ( | const Matrix< double > & | new_data | ) |
This method sets a new data matrix. The number of rows must be equal to the number of instances. The number of columns must be equal to the number of variables. Indices of all training, validation and testing instances and input and target variables do not change.
new_data | Data matrix. |
Definition at line 1823 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_display | ( | bool | new_display | ) |
This method sets a new display value. If it is set to true messages from this class are to be displayed on the screen; if it is set to false messages from this class are not to be displayed on the screen.
new_display | Display value. |
Definition at line 1807 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_input | ( | void | ) |
This method sets all the variables in the data set as input variables.
Definition at line 1548 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_input_instance | ( | int | instance_index, | |
const Vector< double > & | input_instance | |||
) |
This method sets new input values of a single instance in the input-target data set.
instance_index | Index of the instance. | |
input_instance | New input values of the instance. |
Definition at line 2100 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_input_variables_indices | ( | const Vector< int > & | new_input_variables_indices | ) |
This method sets new indices for the input variables from a vector of integers. The size of that vector is the number of input variables. This method does not check for repeated indices.
new_input_variables_indices | Indices of input variables. |
Definition at line 1525 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_instance | ( | int | instance_index, | |
const Vector< double > & | instance | |||
) |
This method sets new input and target values of a single instance in the input-target data set.
instance_index | Index of the instance. | |
instance | New input and target values of the instance. |
Definition at line 1931 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_instances_number | ( | int | new_instances_number | ) |
This method sets a new number of instances in the input-target data set. All instances are also set for training. The indices of the input and target variables do not change.
new_instances_number | Number of instances. |
Definition at line 1868 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_target | ( | void | ) |
This method sets all the variables in the data set as target variables.
Definition at line 1562 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_target_instance | ( | int | instance_index, | |
const Vector< double > & | target_instance | |||
) |
This method sets new target values of a single instance in the input-target data set.
instance_index | Index of the instance. | |
target_instance | New target values of the instance. |
Definition at line 2161 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_target_variables_indices | ( | const Vector< int > & | new_target_variables_indices | ) |
This method sets new indices for the target variables from a vector of integers. The size of that vector is the number of target variables. This method does not check for repeated indices.
new_target_variables_indices | Indices of target variables. |
Definition at line 1538 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_testing | ( | void | ) |
This method sets all the instances in the data set for testing.
Definition at line 1506 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_testing_input_instance | ( | int | i, | |
const Vector< double > & | new_testing_input_instance | |||
) |
This method sets new input values of a single testing instance in the input-target data set.
i | Index of the testing instance. | |
new_testing_input_instance | New input values of that instance. |
Definition at line 2300 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_testing_instance | ( | int | i, | |
const Vector< double > & | new_testing_instance | |||
) |
This method sets new input and target values of a single testing instance in the input-target data set.
i | Index of the testing instance. | |
new_testing_instance | New input and target values of the testing instance. |
Definition at line 2061 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_testing_instances_indices | ( | const Vector< int > & | new_testing_instances_indices | ) |
This method sets new indices for the testing instances from a vector of integers. The size of that vector is the number of testing instances. This method does not check for repeated indices.
new_testing_instances_indices | Indices of testing instances. |
Definition at line 1445 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_testing_target_instance | ( | int | i, | |
const Vector< double > & | new_testing_target_instance | |||
) |
This method sets new target values of a single testing instance in the input-target data set.
i | Index of the testing instance. | |
new_testing_target_instance | New target values of that instance. |
Definition at line 2418 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_training | ( | void | ) |
This method sets all the instances in the data set for training.
Definition at line 1474 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_training_input_instance | ( | int | i, | |
const Vector< double > & | new_training_input_instance | |||
) |
This method sets new input values of a single training instance in the input-target data set.
i | Index of the training instance. | |
new_training_input_instance | New input values of that instance. |
Definition at line 2222 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_training_instance | ( | int | i, | |
const Vector< double > & | new_training_instance | |||
) |
This method sets new input and target values of a single training instance in the input-target data set.
i | Index of the training instance. | |
new_training_instance | New input and target values of the training instance. |
Definition at line 1983 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_training_instances_indices | ( | const Vector< int > & | new_training_instances_indices | ) |
This method sets new indices for the training instances from a vector of integers. The size of that vector is the number of training instances. This method does not check for repeated indices.
new_training_instances_indices | Indices of training instances. |
Definition at line 1381 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_training_target_instance | ( | int | i, | |
const Vector< double > & | new_training_target_instance | |||
) |
This method sets new target values of a single training instance in the input-target data set.
i | Index of the training instance. | |
new_training_target_instance | New target values of that instance. |
Definition at line 2339 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_validation | ( | void | ) |
This method sets all the instances in the data set for validation.
Definition at line 1490 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_validation_input_instance | ( | int | i, | |
const Vector< double > & | new_validation_input_instance | |||
) |
This method sets new input values of a single validation instance in the input-target data set.
i | Index of the validation instance. | |
new_validation_input_instance | New input values of that instance. |
Definition at line 2261 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_validation_instance | ( | int | i, | |
const Vector< double > & | new_validation_instance | |||
) |
This method sets new input and target values of a single validation instance in the input-target data set.
i | Index of the validation instance. | |
new_validation_instance | New input and target values of the validation instance. |
Definition at line 2022 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_validation_instances_indices | ( | const Vector< int > & | new_validation_instances_indices | ) |
This method sets new indices for the validation instances from a vector of integers. The size of that vector is the number of validation instances. This method does not check for repeated indices.
new_validation_instances_indices | Indices of validation instances. |
Definition at line 1413 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_validation_target_instance | ( | int | i, | |
const Vector< double > & | new_validation_target_instance | |||
) |
This method sets new target values of a single validation instance in the input-target data set.
i | Index of the validation instance. | |
new_validation_target_instance | New target values of that instance. |
Definition at line 2379 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_variable_description | ( | int | i, | |
const std::string & | new_variable_description | |||
) |
This method set the description of a single variable. If the vector of descriptions is zero the rest of elements are initialized as empty strings.
i | Index of variable. | |
new_variable_description | Description of variable. |
Definition at line 1762 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_variable_name | ( | int | i, | |
const std::string & | new_variable_name | |||
) |
This method set the name of a single variable. If the vector of names is zero the rest of elements are initialized as empty strings.
i | Index of variable. | |
new_variable_name | Name of variable. |
Definition at line 1610 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_variable_units | ( | int | i, | |
const std::string & | new_variable_units | |||
) |
This method set the units of a single variable. If the vector of units is zero the rest of elements are initialized as empty strings.
i | Index of variable. | |
new_variable_units | Units of variable. |
Definition at line 1686 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_variables_description | ( | const Vector< std::string > & | new_variables_description | ) |
This method sets new descriptions for the variables in the data set from a vector of strings. The size of that vector must be equal to the total number of variables.
new_variables_description | Description of variables. |
Definition at line 1730 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_variables_name | ( | const Vector< std::string > & | new_variables_name | ) |
This method sets new names for the variables in the data set from a vector of strings. The size of that vector must be equal to the total number of variables.
new_variables_name | Name of variables. |
Definition at line 1578 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_variables_number | ( | int | new_variables_number | ) |
This method sets a new number of input variables in the input-target data set. The indices of the training, validation and testing instances do not change. All variables are set as input.
new_variables_number | Number of variables. |
Definition at line 1900 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::set_variables_units | ( | const Vector< std::string > & | new_variables_units | ) |
This method sets new units for the variables in the data set from a vector of strings. The size of that vector must be equal to the total number of variables.
new_variables_units | Units of variables. |
Definition at line 1654 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::split_given_indices | ( | const Vector< int > & | new_training_instances_indices, | |
const Vector< int > & | new_validation_instances_indices, | |||
const Vector< int > & | new_testing_instances_indices | |||
) |
This method sets new training, validation and testing indices from given vectors.
new_training_instances_indices | Indices of instances to be used for training. | |
new_validation_instances_indices | Indices of instances to be used for validation. | |
new_testing_instances_indices | Indices of instances to be used for testing. |
Definition at line 4545 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::split_random_indices | ( | void | ) |
This method creates new training, validation and testing indices at random. It uses the following default values:
Definition at line 4648 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::split_random_indices | ( | double | training_instances_ratio, | |
double | validation_instances_ratio, | |||
double | testing_instances_ratio | |||
) |
This method creates new training, validation and testing indices at random.
training_instances_ratio | Ratio of training instances in the data set. | |
validation_instances_ratio | Ratio of validation instances in the data set. | |
testing_instances_ratio | Ratio of testing instances in the data set. |
Definition at line 4577 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::subtract_instance | ( | int | instance_index | ) |
This method substract the input-target instance with a given index from the input-target data set. All instances are also set for training. Note that resizing is here necessary and therefore computationally expensive.
instance_index | Index of instance to be removed. |
Definition at line 2492 of file InputTargetDataSet.cpp.
std::string Flood::InputTargetDataSet::to_XML | ( | bool | show_declaration | ) |
This method returns a string representation of the input-target data set object:
show_declaration | True if an XML-type declaration is to be included at the beginning. |
Definition at line 3715 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::unscale_data_mean_standard_deviation | ( | const Vector< double > & | mean, | |
const Vector< double > & | standard_deviation | |||
) |
This method unscales the data matrix with given mean and standard deviation values. It updates the data matrix.
mean | Mean of variables. | |
standard_deviation | Standard deviation of variables. |
Definition at line 3422 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::unscale_data_minimum_maximum | ( | const Vector< double > & | minimum, | |
const Vector< double > & | maximum | |||
) |
This method unscales the data matrix with given minimum and maximum values. It updates the data matrix.
minimum | Minimum of variables. | |
maximum | Maximum of variables. |
Definition at line 3436 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::unscale_input_variables_mean_standard_deviation | ( | const Vector< double > & | input_variables_mean, | |
const Vector< double > & | input_variables_standard_deviation | |||
) |
This method unscales the input variables with given mean and standard deviation values. It updates the input variables of the data matrix.
input_variables_mean | Mean values for the input variables to be used for unscaling. | |
input_variables_standard_deviation | Standard deviation values for the input variables to be used for unscaling. |
Definition at line 3450 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::unscale_input_variables_minimum_maximum | ( | const Vector< double > & | input_variables_minimum, | |
const Vector< double > & | input_variables_maximum | |||
) |
This method unscales the input variables with given minimum and maximum values. It updates the input variables of the data matrix.
input_variables_minimum | Minimum values for the input variables to be used for unscaling. | |
input_variables_maximum | Maximum values for the input variables to be used for unscaling. |
Definition at line 3491 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::unscale_target_variables_mean_standard_deviation | ( | const Vector< double > & | target_variables_mean, | |
const Vector< double > & | target_variables_standard_deviation | |||
) |
This method unscales the target variables with given mean and standard deviation values. It updates the target variables of the data matrix.
target_variables_mean | Mean values for the target variables to be used for unscaling. | |
target_variables_standard_deviation | Standard deviation values for the target variables to be used for unscaling. |
Definition at line 3532 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::unscale_target_variables_minimum_maximum | ( | const Vector< double > & | target_variables_minimum, | |
const Vector< double > & | target_variables_maximum | |||
) |
This method unscales the target variables with given minimum and maximum values. It updates the target variables of the data matrix.
target_variables_minimum | Minimum values for the target variables to be used for unscaling. | |
target_variables_maximum | Maximum values for the target variables to be used for unscaling. |
Definition at line 3573 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::unscale_variables_mean_standard_deviation | ( | const Vector< Vector< double > > & | variables_statistics | ) |
This method unscales the input and the target variables with given mean and standard deviation values. Please note that it takes as argument a vector of vectors of all basic statistics, with size eight. It updates the input and the target variables of the data matrix.
variables_statistics | Statistics for the input and target variables to be used for unscaling. |
Definition at line 3615 of file InputTargetDataSet.cpp.
void Flood::InputTargetDataSet::unscale_variables_minimum_maximum | ( | const Vector< Vector< double > > & | variables_statistics | ) |
This method unscales the input and the target variables with given minimum and maximum values. Please note that it takes as argument a vector of vectors of all basic statistics, with size eight. It updates the input and the target variables of the data matrix.
variables_statistics | Statistics for the input and target variables to be used for unscaling. |
Definition at line 3658 of file InputTargetDataSet.cpp.