00001 /****************************************************************************************************************/ 00002 /* */ 00003 /* OpenNN: Open Neural Networks Library */ 00004 /* www.opennn.cimne.com */ 00005 /* */ 00006 /* T E S T I N G A N A L Y S I S C L A S S H E A D E R */ 00007 /* */ 00008 /* Roberto Lopez */ 00009 /* International Center for Numerical Methods in Engineering (CIMNE) */ 00010 /* Technical University of Catalonia (UPC) */ 00011 /* Barcelona, Spain */ 00012 /* E-mail: rlopez@cimne.upc.edu */ 00013 /* */ 00014 /****************************************************************************************************************/ 00015 00016 #ifndef __TESTINGANALYSIS_H__ 00017 #define __TESTINGANALYSIS_H__ 00018 00019 // OpenNN includes 00020 00021 #include "../utilities/vector.h" 00022 #include "../utilities/matrix.h" 00023 00024 #include "../data_set/data_set.h" 00025 #include "../mathematical_model/mathematical_model.h" 00026 00027 #include "../neural_network/neural_network.h" 00028 00029 #include "function_regression_testing.h" 00030 #include "pattern_recognition_testing.h" 00031 #include "time_series_prediction_testing.h" 00032 #include "inverse_problem_testing.h" 00033 00034 00035 namespace OpenNN 00036 { 00037 00046 00047 class TestingAnalysis 00048 { 00049 00050 public: 00051 00052 // DEFAULT CONSTRUCTOR 00053 00054 explicit TestingAnalysis(void); 00055 00056 // NEURAL NETWORK CONSTRUCTOR 00057 00058 explicit TestingAnalysis(NeuralNetwork*); 00059 00060 // MATHEMATICAL MODEL CONSTRUCTOR 00061 00062 explicit TestingAnalysis(MathematicalModel*); 00063 00064 // DATA SET CONSTRUCTOR 00065 00066 explicit TestingAnalysis(DataSet*); 00067 00068 // NEURAL NETWORK AND DATA SET CONSTRUCTOR 00069 00070 explicit TestingAnalysis(NeuralNetwork*, DataSet*); 00071 00072 // NEURAL NETWORK AND MATHEMATICAL MODEL CONSTRUCTOR 00073 00074 explicit TestingAnalysis(NeuralNetwork*, MathematicalModel*); 00075 00076 // NEURAL NETWORK, DATA SET AND MATHEMATICAL MODEL CONSTRUCTOR 00077 00078 explicit TestingAnalysis(NeuralNetwork*, DataSet*, MathematicalModel*); 00079 00080 // XML CONSTRUCTOR 00081 00082 explicit TestingAnalysis(TiXmlElement*); 00083 00084 // FILE CONSTRUCTOR 00085 00086 explicit TestingAnalysis(const std::string&); 00087 00088 00089 // DESTRUCTOR 00090 00091 virtual ~TestingAnalysis(void); 00092 00093 // METHODS 00094 00095 // Get methods 00096 00097 NeuralNetwork* get_neural_network_pointer(void) const; 00098 DataSet* get_data_set_pointer(void) const; 00099 MathematicalModel* get_mathematical_model_pointer(void) const; 00100 00101 FunctionRegressionTesting* get_function_regression_testing_pointer(void) const; 00102 PatternRecognitionTesting* get_pattern_recognition_testing_pointer(void) const; 00103 TimeSeriesPredictionTesting* get_time_series_prediction_testing_pointer(void) const; 00104 InverseProblemTesting* get_inverse_problem_testing_pointer(void) const; 00105 00106 const bool& get_display(void) const; 00107 00108 // Set methods 00109 00110 void set_neural_network_pointer(NeuralNetwork*); 00111 void set_data_set_pointer(DataSet*); 00112 void set_mathematical_model_pointer(MathematicalModel*); 00113 00114 void set_function_regression_testing_pointer(FunctionRegressionTesting*); 00115 void set_pattern_recognition_testing_pointer(PatternRecognitionTesting*); 00116 void set_time_series_prediction_testing_pointer(TimeSeriesPredictionTesting*); 00117 void set_inverse_problem_testing_pointer(InverseProblemTesting*); 00118 00119 void set_display(const bool&); 00120 00121 void set_default(void); 00122 00123 // Pointer methods 00124 00125 void construct_function_regression_testing(void); 00126 void construct_pattern_recognition_testing(void); 00127 void construct_time_series_prediction_testing(void); 00128 void construct_inverse_problem_testing(void); 00129 00130 void destruct_function_regression_testing(void); 00131 void destruct_pattern_recognition_testing(void); 00132 void destruct_time_series_prediction_testing(void); 00133 void destruct_inverse_problem_testing(void); 00134 00135 // Serialization methods 00136 00137 std::string to_string(void) const; 00138 00139 void print(void) const; 00140 00141 virtual TiXmlElement* to_XML(void) const; 00142 virtual void from_XML(TiXmlElement*); 00143 00144 void save(const std::string&) const; 00145 void load(const std::string&); 00146 00147 00148 private: 00149 00150 // MEMBERS 00151 00153 00154 NeuralNetwork* neural_network_pointer; 00155 00157 00158 DataSet* data_set_pointer; 00159 00161 00162 MathematicalModel* mathematical_model_pointer; 00163 00165 00166 FunctionRegressionTesting* function_regression_testing_pointer; 00167 00169 00170 PatternRecognitionTesting* pattern_recognition_testing_pointer; 00171 00173 00174 TimeSeriesPredictionTesting* time_series_prediction_testing_pointer; 00175 00177 00178 InverseProblemTesting* inverse_problem_testing_pointer; 00179 00181 00182 bool display; 00183 }; 00184 00185 } 00186 00187 #endif 00188 00189 // OpenNN: Open Neural Networks Library. 00190 // Copyright (C) 2005-2012 Roberto Lopez 00191 // 00192 // This library is free software; you can redistribute it and/or 00193 // modify it under the terms of the GNU Lesser General Public 00194 // License as published by the Free Software Foundation; either 00195 // version 2.1 of the License, or any later version. 00196 // 00197 // This library is distributed in the hope that it will be useful, 00198 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00199 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00200 // Lesser General Public License for more details. 00201 00202 // You should have received a copy of the GNU Lesser General Public 00203 // License along with this library; if not, write to the Free Software 00204 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA