X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=qFinderDMM.h;fp=qFinderDMM.h;h=df7b44305ef38fc417360bebd729357fb6724e2d;hb=a2cde58c1e72199498a2142983ef040dce36da10;hp=d94e6cce9f11b89de87d9f756ae490c69aabda72;hpb=3e8b80da722e11c72bce957e2f42a6e884dd02b6;p=mothur.git diff --git a/qFinderDMM.h b/qFinderDMM.h index d94e6cc..df7b443 100644 --- a/qFinderDMM.h +++ b/qFinderDMM.h @@ -9,27 +9,19 @@ #ifndef pds_dmm_qFinderDMM_h #define pds_dmm_qFinderDMM_h -/**************************************************************************************************/ - -#include "mothurout.h" +#include "communitytype.h" /**************************************************************************************************/ -class qFinderDMM { +class qFinderDMM : public CommunityTypeFinder { public: qFinderDMM(vector >, int); - double getNLL() { return currNLL; } - double getAIC() { return aic; } - double getBIC() { return bic; } - double getLogDet() { return logDeterminant; } - double getLaplace() { return laplace; } - void printZMatrix(string, vector); - void printRelAbund(string, vector); - + void printFitData(ofstream&); + void printFitData(ostream&, double); + private: - MothurOut* m; - void kMeans(); + void optimizeLambda(); void calculatePiK(); @@ -37,31 +29,14 @@ private: void negativeLogDerivEvidenceLambdaPi(vector&, vector&); double getNegativeLogEvidence(vector&, int); double getNegativeLogLikelihood(); - vector > getHessian(); + int lineMinimizeFletcher(vector&, vector&, double, double, double, double&, double&, vector&, vector&); int bfgs2_Solver(vector&);//, double, double); - double cheb_eval(const double[], int, double); - double psi(double); - double psi1(double); - - vector > countMatrix; - vector > zMatrix; - vector > lambdaMatrix; - vector weights; - vector > error; - - int numPartitions; - int numSamples; - int numOTUs; - int currentPartition; - - double currNLL; - double aic; - double bic; - double logDeterminant; - double laplace; + + + }; /**************************************************************************************************/