DytexMix.hpp
00001
00008 #ifndef DYTEXMIX_HPP
00009 #define DYTEXMIX_HPP
00010
00011 using namespace std;
00012 using namespace cv;
00013
00025 class DytexMix
00026 {
00027 public:
00032 DytexOptions opt;
00037 std::vector<Dytex> dt;
00041 std::vector<double> alpha;
00045 std::vector<int> classes;
00046
00047
00051 std::vector<DytexKalmanFilter> kfb;
00052
00053
00054 DytexMix();
00055
00056 DytexMix(DytexOptions opt);
00057
00058
00059 void learnWithSplitting(std::vector<Mat> &Yin,EMOptions emopt);
00060
00061
00062 DytexMix reduceWithSplitting(HEMOptions);
00063
00064
00065 void getClasses(std::vector<Mat> Y,std::vector<int> &classes);
00066
00067
00068 void getClasses(std::vector<Mat> Y,Mat &LLm);
00069
00070
00071 void setupKFB(int tau);
00072
00073
00074
00075
00076
00077 void runEM(const std::vector<Mat> &Yin,const EMOptions &emopt);
00078
00079 void runHEM(DytexMix &hembest, HEMOptions &hopt,std::vector<int> &classes);
00080
00081 Mat convertmovie(Mat Y,int &sx,int &sy,int &sc,int &cnorm);
00082
00083 Dytex initcluster_doretto(const std::vector<Mat> &Y,const DytexOptions ¶m);
00084
00085 std::vector<Mat> extractY(const Mat &Yin, std::vector<int> inds);
00086
00087 void dytex_mix_split(DytexSplitParams splitopt,int& ctg,int& csp );
00088
00089 void dytex_perturb(Dytex &dtp, double pert, DytexSplitParams::Split_mode mode, DytexSplitParams::Split_vars vars);
00090
00091 void ppertC(Mat &C,Mat S0,double pert);
00092
00093 Dytex init_multiple_dt();
00094
00095 static Mat logtrick(Mat lA);
00096
00097 static bool IsGT2 (int i);
00098
00099 };
00100
00101 #endif