OpenCV 决策树参数问题
OpenCV decision tree parameters issue
我正在使用决策树来解决 16 个类问题。我将参数设置为
CvDTreeParams params = CvDTreeParams(50, // max depth
100,// min sample count
0, // regression accuracy: N/A here
true, // compute surrogate split, no missing data
16, // max number of categories (use sub-optimal algorithm for larger numbers)
5, // the number of cross-validation folds
false, // use 1SE rule => smaller tree
false, // throw away the pruned tree branches
priors // the array of priors
);
CvDTree* dtree = new CvDTree();
dtree->train(data, CV_ROW_SAMPLE, classes,
Mat(), Mat(), var_type, Mat(), params);
但是生成的树最多只能提供 25 个深度。它没有增加深度。我在 Matlab 上尝试了相同的数据,树深度为 50。OpenCV中的树深度有什么限制吗?
OpenCV 源代码中的最大深度有 25 的硬性限制。因此,必须更改二进制文件才能使其正常工作。
相关文章:
- C++转换参数初始化问题
- 在没有参数列表的情况下使用模板名称"Event"无效,模板问题
- 如何修复带有 clang 的参数'args'缺少默认参数的问题?
- 标准::enable_if 和标准::is_arithmetic 作为模板参数的问题
- enable_if中参数包的大小问题
- 构造函数 (C++) 中的 char 指针参数存在问题
- 标准对此指向成员函数类型模板参数有何说明?是我的代码有误,还是 MSVS 16.6 有问题?
- C++复杂情况的比较器通过参数问题
- 调试模板时出现问题.专门针对 Linux GCC 7、GCC 6、GCC 5、GCC 4.9 错误构建失败:模板参数 1
- 使用具有默认参数的函数模板进行 decltype 会使结果混乱(一个有趣的问题或 gcc 的错误)
- 模板<类型名称...参数>的问题
- C++17 中的歧义错误(模板模板参数和默认参数问题)
- constexpr 运算符重载使用参数的问题
- 通过命令行参数获取llvm ir文件时面临问题
- 函数中使用的函数指针的参数的问题
- 我在生成返回为数不多的模板化参数之一cpp的函数时遇到问题
- 从命令行获取参数时出现问题
- C ++回测问题:如何检查构造函数在假定失败时是否失败(给定输入的无效参数)
- C++:关于for语句和参数的一般问题
- 字符串打印机问题:参数 X 没有从“char (*)[xx]”到“char**”的已知转换