quick start:g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_pr.a #include <RegressionDecisionTree.h> RegressionDecisionTree(ALGORITHM algorithm = DEF_ALGORITHM, IMPLEMENTATION implementation = DEF_IMPLEMENTATION, float split_threshold, float merge_threshold, float num_occ_threshold); boolean eq(const RegressionDecisionTree& arg); boolean setAlgorithm(ALGORITHM algorithm);
description:RegressionDecisionTree rdt; rdt.setAlgorithm(MLLR); rdt.setImplementation(MEAN); rdt. initRegressionTree(Vector& stat_models_a, Vector & speech_tag_a); rdt.createTransform(Vector & stat_models_a);
static const String CLASS_NAME = L"RegressionDecisionTree";
enum ALGORITHM { MLLR = 0, DEF_ALGORITHM = MLLR };
enum IMPLEMENTATION { MEAN = 0, VARIANCE, COMBINED, DEF_IMPLEMENTATION = MEAN };
enum SUPERVISION_MODE { SUPERVISED = 0, UNSUPERVISED, DEF_SUPERVISION_MODE = SUPERVISED };
enum SEQUENCE_MODE { BATCH = 0, INCREMENTAL, DEF_SEQUENCE_MODE = BATCH };>/pre>
static const NameMap ALGO_MAP(L"MLLR");
static const NameMap IMPL_MAP(L"MEAN, VARIANCE, COMBINED");
static const NameMap SUP_MODE_MAP(L"SUPERVISED, UNSUPERVISED");
static const NameMap SEQ_MODE_MAP(L"BATCH, INCREMENTAL");
static const String DEF_PARAM = L"";
static const String PARAM_ALGORITHM = L"algorithm";
static const String PARAM_IMPLEMENTATION = L"implementation";
static const String PARAM_SUPERVISION_MODE = L"supervision_mode";
static const String PARAM_SEQUENCE_MODE = L"sequence_mode";
static const String PARAM_SPEECH_FLAG = L"speech_flag";
static const String PARAM_NUM_TERMINALS = L"num_terminal";
static const String PARAM_PERTURB_DEPTH = L"perturb_depth";
static const String PARAM_OCC_THRESHOLD = L"occ_threshold";
static const String PARAM_COMPONENTS_THRESHOLD = L"components_threshold";
static const String PARAM_MIXTURE_OFFSET = L"mixture_offset";
static const String PARAM_BDT = L"base_dt";
static const String YES = L"yes";
static const String NO = L"no";
static const String CPH = L"cph";
static const String POS = L"pos";
static const long DEF_NUM_TERMINALS = 1;
static const boolean DEF_SPEECH_FLAG = true;
static const double DEF_PERTURB_DEPTH = 0.2;
static const double DEF_OCC_THRESHOLD = 1000.0;
static const long DEF_COMPONENTS_THRESHOLD = 100;
static const float DEF_MERGE_THRESHOLD = 5;
static const float DEF_NUM_OCC_THRESHOLD = 100;
static const long ERR = 00100500;
static const long ERR_ADAPT_NO_GAUSSIAN = 00100501;
static const long ERR_UNALG_UNIMP = 00100502;
typedef Triple< Long, Long, Long> RDataPoint;
typedef SingleLinkedList<RDataPoint> Data;
typedef BiGraphVertex<RegressionDecisionTreeNode> RTreeNode;
ALGORITHM algorithm_d;
IMPLEMENTATION implementation_d;
SUPERVISION_MODE supervision_mode_d;
SEQUENCE_MODE sequence_mode_d;
RegressionDecisionTreeNode rdt_rootnode_d;
Boolean speech_flag_d;
Long num_terminals_d;
Double perturb_depth_d;
Double occ_threshold_d;>/pre>
Long components_threshold_d;
VectorLong mixture_offset_d;
VectorLong map_stat_to_trans_d;
Vectorstat_models_d;
static MemoryManager mgr_d;
static const String& name();
static boolean diagnose(Integral::DEBUG debug_level);
boolean debug(const unichar* message) const;
~RegressionDecisionTree();
RegressionDecisionTree(ALGORITHM algorithm = DEF_ALGORITHM, IMPLEMENTATION implementation = DEF_IMPLEMENTATION, float floor);
RegressionDecisionTree(const RegressionDecisionTree& arg);
boolean assign(const RegressionDecisionTree& arg);
RegressionDecisionTree& operator= (const RegressionDecisionTree& arg);
long sofSize() const;
boolean read(Sof& sof, long tag, const String& name = CLASS_NAME);
boolean write(Sof& sof, long tag, const String& name = CLASS_NAME) const;
boolean readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);
boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;
boolean eq(const RegressionDecisionTree& arg) const;
static void* operator new(size_t size);
static void* operator new[](size_t size);
static void operator delete(void* ptr);
static void operator delete[](void* ptr);
static boolean setGrowSize(long grow_size);
boolean clear(Integral::CMODE ctype = Integral::DEF_CMODE);
boolean setAlgorithm(ALGORITHM algorithm);
boolean setImplementation(IMPLEMENTATION implementation);
boolean set(ALGORITHM algorithm = DEF_ALGORITHM, IMPLEMENTATION implementation = DEF_IMPLEMENTATION);
ALGORITHM getAlgorithm() const;
IMPLEMENTATION getImplementation() const;
boolean get(ALGORITHM& algorithm, IMPLEMENTATION& implementation);
boolean initRegressionTree(Vectorboolean createTransform(Vector& stat_models_a, Vector & speech_tag_a);
boolean createTransforms(RTreeNode*& root_node_a, Vector& stat_models_a);
boolean getMean(long sm_index_a, long gm_index_a, VectorFloat& mean_a);
boolean getGaussianModel(long sm_index_a, long gm_index_a, GaussianModel& gm_a);
boolean updateTransformID(Vector& stat_models_a);
boolean setParser(SofParser* parser);
boolean runDecisionTree();
RTreeNode* findBestTerminal(RTreeNode*& node_a, RTreeNode*& best_a, float& score_a);
RTreeNode* findBestTerminal(RTreeNode*& node_a, RTreeNode*& best_a, long& components_a);
BiGraphVertex* findBestTerminal(RTreeNode*& root_node_a, long index_a);
boolean buildRegressionCluster(RTreeNode*& root_node);
boolean perturbMean(RegressionDecisionTreeNode*& child_node_a, double perturbDepth);
boolean clusterChildren(RegressionDecisionTreeNode*& root_node_a, RegressionDecisionTreeNode*& left_child_node_a, RegressionDecisionTreeNode*& right_child_a);
boolean clusterChildren(RegressionDecisionTreeNode*& root_node_a, RegressionDecisionTreeNode*& left_child_node_a, RegressionDecisionTreeNode*& right_child_a);
boolean calculateDistance(RegressionDecisionTreeNode*& root_node_a, RegressionDecisionTreeNode*& left_child_node_a, RegressionDecisionTreeNode*& right_child_a);
boolean createChildNode(RegressionDecisionTreeNode*& root_node_a, RegressionDecisionTreeNode*& left_child_node_a, RegressionDecisionTreeNode*& right_child_a);examples: