Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

SequentialValidation.h

Go to the documentation of this file.
00001 // -*- C++ -*- 00002 00003 // SequentialValidation.h 00004 // 00005 // Copyright (C) 2003 Rejean Ducharme, Yoshua Bengio 00006 // Copyright (C) 2003 Pascal Vincent 00007 // 00008 // Redistribution and use in source and binary forms, with or without 00009 // modification, are permitted provided that the following conditions are met: 00010 // 00011 // 1. Redistributions of source code must retain the above copyright 00012 // notice, this list of conditions and the following disclaimer. 00013 // 00014 // 2. Redistributions in binary form must reproduce the above copyright 00015 // notice, this list of conditions and the following disclaimer in the 00016 // documentation and/or other materials provided with the distribution. 00017 // 00018 // 3. The name of the authors may not be used to endorse or promote 00019 // products derived from this software without specific prior written 00020 // permission. 00021 // 00022 // THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR 00023 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00024 // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 00025 // NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00026 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 00027 // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00028 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00029 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00030 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00031 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00032 // 00033 // This file is part of the PLearn library. For more information on the PLearn 00034 // library, go to the PLearn Web site at www.plearn.org 00035 00036 00037 00038 #ifndef SEQUENTIAL_VALIDATION 00039 #define SEQUENTIAL_VALIDATION 00040 00041 #include <plearn/base/Object.h> 00042 #include <plearn_learners/generic/StatefulLearner.h> 00043 #include <plearn/vmat/VMat.h> 00044 #include <plearn/base/PP.h> 00045 00046 namespace PLearn { 00047 using namespace std; 00048 00049 00050 class SequentialValidation: public Object 00051 { 00052 typedef Object inherited; 00053 00054 public: 00055 00056 // ********************* 00057 // * public options * 00058 // ********************* 00059 00061 int init_train_size; 00062 00064 int last_test_time; 00065 00067 VMat dataset; 00068 00070 PP<StatefulLearner> learner; 00071 00073 TVec<string> statnames; 00074 00076 TVec<string> timewise_statnames; 00077 00079 string expdir; 00080 00081 bool report_stats; 00082 bool save_final_model; 00083 bool save_initial_model; 00084 bool save_initial_seqval; 00085 bool save_data_sets; 00086 bool save_test_outputs; 00087 bool save_test_costs; 00088 bool save_stat_collectors; 00089 bool provide_learner_expdir; /* =true */ 00090 00091 private: 00092 00094 void build_(); 00095 00096 protected: 00097 00099 static void declareOptions(OptionList& ol); 00100 virtual void reportStats(const Vec& global_result); 00101 00102 public: 00103 00105 SequentialValidation(); 00106 00108 virtual void build(); 00109 00110 virtual void setExperimentDirectory(const string& _expdir); 00111 00113 virtual void run(); 00114 00117 PLEARN_DECLARE_OBJECT(SequentialValidation); 00118 }; 00119 00121 DECLARE_OBJECT_PTR(SequentialValidation); 00122 00123 } // end of namespace PLearn 00124 00125 #endif

Generated on Tue Aug 17 16:05:31 2004 for PLearn by doxygen 1.3.7