31 MLfunc() :m_pModel(NULL), m_pCorpusTrain(NULL), m_pCorpusValid(NULL), m_pCorpusTest(NULL) {
32 m_pathOutputModel = NULL;
34 MLfunc(
Model *pModel, CorpusBase *pTrain, CorpusBase *pValid = NULL, CorpusBase *pTest = NULL);
35 void Reset(
Model *pModel, CorpusBase *pTrain, CorpusBase *pValid = NULL, CorpusBase *pTest = NULL);
37 virtual void SetParam(
double *pdParams);
38 void GetParam(
double *pdParams);
43 virtual double GetLL(CorpusBase *pCorpus,
int nCalNum = -1);
45 virtual double GetValue();
46 virtual void GetGradient(
double *pdGradient);
47 virtual int GetExtraValues(
int t,
double *pdValues);
const char * m_pathOutputModel
Write to model during iteration.
hidden-random-field model
trf::CorpusBase CorpusBase
CorpusBase * m_pCorpusTrain
training corpus
Vec< Prob > m_trainPi
the length distribution in training corpus
CorpusBase * m_pCorpusValid
valid corpus
define the framework of iterative algorithms, such as gradient descent or LBFGS.
Model * m_pModel
HRF model.
the objective function, used to derive
define all the code written by Bin Wang.
CorpusBase * m_pCorpusTest
test corpus