TRF Language Model
hrf-code-exam.h
Go to the documentation of this file.
1 #ifndef _HRF_CODE_EXAM_H_
2 #define _HRF_CODE_EXAM_H_
3 
4 #include "hrf-model.h"
5 #include "hrf-sa-train.h"
6 
7 namespace hrf
8 {
9  class ModelExam
10  {
11  public:
13 
14  public:
15  ModelExam(Model *p) :pm(p) {}
17  void SetValueAll(PValue v);
19  void SetValueRand();
21  void TestNormalization(int nLen);
23  void TestExpectation(int nLen);
25  void TestHiddenExp(int nLen);
27  void TestSample(int nLen = -1);
28  };
29 
30  class SAExam
31  {
32  public:
34  public:
35  SAExam(SAfunc *p) : pfunc(p){}
37  void TestGradient();
38  };
39 }
40 
41 #endif
void SetValueAll(PValue v)
set parameter values
SAfunc * pfunc
Definition: hrf-code-exam.h:33
void TestSample(int nLen=-1)
test sample
trf::PValue PValue
Definition: hrf-model.h:24
SAExam(SAfunc *p)
Definition: hrf-code-exam.h:35
hidden-random-field model
Definition: hrf-model.h:98
void TestHiddenExp(int nLen)
test hidden expectation
void SetValueRand()
set parameter values randomly
ModelExam(Model *p)
Definition: hrf-code-exam.h:15
void TestNormalization(int nLen)
test the exact normalization
void TestExpectation(int nLen)
test feat expectation