Go to the documentation of this file.00001
00002 #ifndef clsfy_adaboost_trainer_h_
00003 #define clsfy_adaboost_trainer_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include <vsl/vsl_binary_io.h>
00020 #include <clsfy/clsfy_simple_adaboost.h>
00021 #include <clsfy/clsfy_builder_1d.h>
00022 #include <mbl/mbl_data_wrapper.h>
00023 #include <vcl_string.h>
00024 #include <vcl_iosfwd.h>
00025
00026
00027
00028
00029
00030 class clsfy_adaboost_trainer
00031 {
00032 public:
00033
00034
00035 clsfy_adaboost_trainer();
00036
00037
00038 virtual ~clsfy_adaboost_trainer();
00039
00040
00041
00042
00043 void build_strong_classifier(clsfy_simple_adaboost& strong_classifier,
00044 int max_n_clfrs,
00045 clsfy_builder_1d& builder,
00046 mbl_data_wrapper<vnl_vector<double> >& egs0,
00047 mbl_data_wrapper<vnl_vector<double> >& egs1);
00048
00049
00050 void clsfy_update_weights_weak(vnl_vector<double> &wts,
00051 const vnl_vector<double>& data,
00052 clsfy_classifier_1d& classifier,
00053 int class_number,
00054 double beta);
00055
00056
00057 void clsfy_get_elements(vnl_vector<double>& v,
00058 mbl_data_wrapper<vnl_vector<double> >& data, int j);
00059
00060
00061 short version_no() const;
00062
00063
00064 vcl_string is_a() const;
00065
00066
00067 virtual bool is_class(vcl_string const& s) const;
00068
00069
00070 void print_summary(vcl_ostream& os) const;
00071
00072
00073 void b_write(vsl_b_ostream& bfs) const;
00074
00075
00076 void b_read(vsl_b_istream& bfs);
00077
00078 protected:
00079 #if 0
00080
00081
00082
00083
00084
00085
00086
00087
00088 clsfy_adaboost_trainer( const clsfy_adaboost_trainer& b );
00089
00090
00091 clsfy_adaboost_trainer& operator=( const clsfy_adaboost_trainer& b );
00092 #endif
00093 };
00094
00095
00096
00097
00098 void vsl_b_write(vsl_b_ostream& bfs, const clsfy_adaboost_trainer& b);
00099
00100
00101 void vsl_b_read(vsl_b_istream& bfs, clsfy_adaboost_trainer& b);
00102
00103
00104 vcl_ostream& operator<<(vcl_ostream& os,const clsfy_adaboost_trainer& b);
00105
00106
00107 void vsl_print_summary(vcl_ostream& os,const clsfy_adaboost_trainer& b);
00108
00109 #endif // clsfy_adaboost_trainer_h_