-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMotifRegressor.H
101 lines (98 loc) · 2.8 KB
/
MotifRegressor.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#ifndef _MOTIF_REGRESSOR_
#define _MOTIF_REGRESSOR_
class VariableManager;
class EvidenceManager;
class MotifManager;
class ExpertL;
class Matrix;
class BFGSWrapper;
class MotifRegressor
{
public:
MotifRegressor();
~MotifRegressor();
int setVariableManager(VariableManager*);
int setEvidenceManager(EvidenceManager*);
int setMotifManager(MotifManager*);
int setOutputDir(const char*);
int setExpertCnt(int);
int learnMoE();
int learnMoE_CrossValidation(int neededfoldCnt);
int showMoE();
int showMoEParameters(const char*);
int showGenatomyModule();
int showClusterAssignment();
int dispTFsPerCluster();
int dispTFsPerCluster(int);
int generateData(const char*,int);
typedef enum
{
KMEANS,
RAND,
GMM
}InitType;
int setInitType(InitType);
int setInitClusterFile(const char*);
int predictTestData(map<string,map<string,int>*>&);
int predictTestExpression();
double getTestDataLikelihood(double&);
int setUntransformedData(const char*);
private:
int initExperts();
int initExpertsKMeans();
int initExpertsGMM();
int initVarsWithPredictors();
int initPredictorsWithVars();
int split(int);
int cleanUp();
int expectationStep();
int maximizationStep();
int normalizeWeights(map<int,double>&);
int populateRandIntegers(vector<int>& randIndex,int evidCnt);
int estimateMeanCov(vector<int>& randIndex,int startInd,int endInd,ExpertL* e);
int estimateMeanCov(int expertid,ExpertL* e);
int estimateGlobalCov(ExpertL* e);
int estimateMean(vector<int>& randIndex,int startInd,int endInd,ExpertL* e);
int setInitFeatureWeights(ExpertL* e);
int populateBFGSData();
int populateBFGSGammas();
int updateFeatureWeights();
double getScore();
int matrixifyData();
int assignGenesToExperts();
int assignGenesToExperts_Exclusive();
int assignGenesToExperts_Exclusive_ML();
int getFeatureEnrichment(ExpertL* e,INTDBLMAP& featEnrich);
int showGammas(const char*);
int readClusterMembership();
int showUntransformedFName();
EvidenceManager* evMgr;
VariableManager* varMgr;
MotifManager* motifMgr;
int expertCnt;
map<int,ExpertL*> expertSet;
BFGSWrapper bfgs;
map<int,int> varsWithPredictors_Train;
map<int,int> varsWithPredictors_Test;
map<string,int> varsWithPredictors_Train_NameID;
map<int,double> predictionCorr;
map<int,double> predictionProb;
map<int,int> varsWithPredictors;
map<int,int> predsWithVars;
map<int,map<int,double>*> gammas;
map<int,Matrix*> exprProfileSet;
map<int,int> featIDMatidMap;
map<int,int> featMatidIDMap;
gsl_rng* r;
map<int,int> matIdvIdMap;
char outputDir[1024];
InitType initType;
int foldCnt;
map<int,double> holdoutLL;
map<int,double> trainLL;
map<int,double> holdout_unpenLL;
char clusterFName[1024];
char untransformedFName[1024];
map<int,map<string,int>*> gmmClusters;
};
#endif