本文整理汇总了C++中HMM::TagLogs方法的典型用法代码示例。如果您正苦于以下问题:C++ HMM::TagLogs方法的具体用法?C++ HMM::TagLogs怎么用?C++ HMM::TagLogs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HMM
的用法示例。
在下文中一共展示了HMM::TagLogs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main_run
int main_run(char * args[]){
vector<vector<T>> ufile = read(args[1]);
vector<vector<T>> tfile = read(args[2]);
vector<vector<T>> logs = read(args[3]);
HMM<T> hmm;
/*for (auto i = transformed.begin(); i != transformed.end(); ++i) {
for (auto j = i->begin(); j != i->end(); ++j) {
cout<<j->first<<"\t"<<j->second<<"\n";
}
}*/
hmm.Train(ufile, tfile);
map<int, string> tagcodemap;
vector<vector<T>> taglist = hmm.TagLogs(logs, tagcodemap);
vector<vector<T>> transformed = transform2(taglist);
//FP GROWTH PART FOR CLUSTERING after classification
int s = atoi(args[4]);
FPTree<T> tree(s);
//consider the position of token in the line
tree.build(transformed);
std::vector<std::vector<T>> r;
clock_t t = clock();
tree.mine(r);
std::cout<<"Initial pattern no: "<<r.size()<<"\n";
Cluster<T> data;
data.AssociatePatterns(transformed, r);
cout << "Time: " << double(clock() - t) / CLOCKS_PER_SEC << "\n";
data.DisplayCluster(logs, transformed, r, tagcodemap);
Analyze<T> analyze;
vector<vector<T>> manual = read("manual");
cout<<"\n"<<analyze.Efficiency(taglist, manual);
}