如何设计分类器接口,不同的分类器和数据存储
How to design Classifier interface, different classifiers and data storage?
我有一个类:
class TextClassifier {
public:
void init(const std::string& file);
TextType classify(const std::string& text) const;
private:
HashMap<...> data_;
}
函数init将文件中的一些统计信息加载到HashMap中,函数category进行Naive Bayes分类。
我认为进行重构是个好主意,这样类的用户就可以提供不同的分类器和不同类型的DataStorage。
但我有点困,因为我不擅长设计。你能推荐一些好的设计吗?你能不能也推荐一些关于这个主题的文献?谢谢
也许您应该了解一下策略模式:http://en.wikipedia.org/wiki/Strategy_pattern
相关文章:
- 为我的 c++ 类介绍制作一个三角形分类器.我有几个问题
- 只有级联分类器会发出未定义的引用错误
- 在地图中使用自定义删除器存储unique_ptr
- 将svm分类器设置为HOG检测器
- 将列表迭代器存储为成员
- 在C /OBJ-C 中运行Tensorflow分类器模型与Python的结果不同
- 贝叶斯和SVM分类器在OpenCV3中的实现
- 如何在OpenCV中从3D模型训练HAAR分类器?
- Tensorflow - Deep MNIST 教程 - 将分类器导出到C++
- OpenCV SVM 分类器图像识别
- 一个粒子太多:GL_INVALID_VALUE生成错误。<start> 不满足着色器存储缓冲区的最低对齐要求
- 哪个分类器可用于使用C 和OPENCV进行铁路线检测
- CNTK中的二进制分类器,带有C
- 打开"GL着色器存储缓冲区对象"以替换"顶点属性"
- 是时候训练分类器了
- SVM 分类器未保存在 ".xml" 中?
- 带有级联或 SVM 分类器的 HOG.C++ OpenCV (V2.4.5) 中的程序
- 着色器存储缓冲区中的 OpenGL 顶点
- 着色器存储缓冲区的所有值在几何着色器中均为 0
- 如何设计分类器接口,不同的分类器和数据存储