问题标签 [catboost]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - Catboost 点击率设置
我将 catboost 用于具有分类数据的多分类任务。我正在检查 ctr 的默认参数,即从分类数据到数值数据的转换。据说ctr的默认值为“None”。
据我了解,这是一个可选步骤。
该算法确实在我的数据集上工作,所以我想知道它是否使用:
- Gradient Boosting 属性来理解分类数据
- 还是它实际上使用了 Borders、Buckets、BinarizedTargetMeanValue、Counter 中的默认方法
- 或者它是否使用示例中给出的公式avg_target = (countInclass + prior) / (totalcount +1) 默认情况下看起来像“Buckets”
python - CatBoost 可以安装在 Conda 环境中吗?
Yandex 是否支持 Anaconda 环境?我试图让 CatBoost 使用 Anaconda 环境作为 Python 解释器在 PyCharm 中工作,但我继续收到 ModuleNotFoundError: No module named 'catboost'。我可以使用 pip 安装 CatBoost,但不能使用“conda install”,特别是不能使用 -n 标志指定特定 conda 环境的“conda install”。</p>
python - catboost 在玩具数据集上显示非常糟糕的结果
今天,我尝试测试 Yandex 最近发布的一个惊人的 Catboost 库,但即使在玩具数据集上,它也显示出非常糟糕的结果。我试图找到问题的根源,但由于缺乏有关图书馆的适当文档和主题,我无法弄清楚发生了什么。请帮助我 =) 我正在使用 Anaconda 3 x64 和 Python 3.6。
python - catboost cv 生成日志文件
当我使用交叉验证 CV 对象时,正在创建许多 TSV 文件和 json 文件。我找不到任何方法来阻止 CV 在文档中不生成这些内容并最终手动删除它们。这些文件显然来自 CV(我已经检查过),并以折叠或一般结果(例如剩余时间和测试分数)命名。
任何人都知道设置为关闭它的参数吗?
python - 用于二进制分类的 Catboost CTR
我正在阅读https://tech.yandex.com/catboost/doc/dg/concepts/algorithm-main-stages_cat-to-numberic-docpage/上的文档,但找不到 Catboost 用于编码分类的默认设置在二进制目标的情况下的变量。
具体来说,我找不到它使用什么类型的编码方法(桶,计数器,...)以及什么是先验的默认值。
此外,还不清楚如何为测试集计算编码。既然我们不知道目标的价值,我们只是保持他们不变?
r - R中的Catboost构建和安装错误
代理出现问题,我尝试按照此说明从 Windows 中的本地副本为 R 安装 catboost 。
唯一的区别是我没有通过 gitbash 下载 catboost repo,而是通过网站手动下载。
我已经安装了 python 并将其添加到路径中。
我已经安装了 Visual Studio Community 2017,带有 Windows 平台开发和带有 C++ 选项的桌面开发。
我还安装了 VC++ 2015.3 v140 桌面工具集 (x86,x64) 和 VC++ 2017 v141 工具集 (x86,x64) 选项。
直到这里没有问题也没有警告。
然后我将工作目录设置为 catboost R-package。然后使用 devtools 构建和安装包。
在这里,我对构建有以下警告:
以及安装时出现以下错误:
这是我的 R 会话信息:
python - Google AppEngine Python 柔性环境上的 Catboost
我正在尝试设置一个简单的 Google AppEngine 应用程序,该应用程序将通过 POST 请求获取 JSON 数据并应用 Catboost 分类器。
我正在使用 Python 3.6,并且已包含catboost==0.8
在我的requirements.txt
文件中。
但是,部署失败:
我的基本 Dockerfile 如下:
我怀疑问题sys.modules
在于没有_catboost
在 importing 上注册catboost
。在 Google AppEngine 柔性环境中,有没有办法使用使用 C 库的第三方应用程序,例如 Catboost?
machine-learning - catboost算法中对称树背后的直觉是什么?
我一直在研究 catboost 算法,我很难看出使用对称树的意义。在这方面,我在他们的 github 中发现:
该算法的一个重要部分是它使用对称树并逐级构建它们。对称树是一棵树,其中每个级别的节点使用相同的拆分。这允许使用 idex 对叶子的路径进行编码。例如,有一棵深度为 2 的树。第一层的拆分是 f1<2,第二层的拆分是 f2<4。那么 f1=5, f2=0 的对象将有编号为 01b 的叶子。
他们说这有助于减少过度拟合并进行更快的推理,但对我来说,直觉上,这就像你需要两倍的深度来探索相同数量的分割。
那么,任何人都可以解释使用这种类型的树的实际优势是什么?
非常感谢。
java - Passing pointer to pointer to float from Java through JNA to a C dynamic library
Catboost offers a dynamic C library, which theoretically can be used from any programming language.
I'm trying to call it through Java using JNA.
I'm having a problem with the CalcModelPrediction
function, defined in the header file as follows:
In Java, I've defined the interface function as follows:
and then I'm calling it like this:
I've tried passing Pointer
, PointerByReference
and Pointer[]
to the CalcModelPrediction
function in place of float **floatFeatures
and char ***catFeatures
but nothing worked. I always get a segmentation fault, presumably when the CalcModelPrediction
function attempts to get elements of floatFeatures
and catFeatures
by calling floatFeatures[0][0]
and catFeatures[0][0]
.
So the question is, what's the right way of passing a multi-dimensional array from Java through JNA into C, where it could be treated as a pointer to a pointer to a value?
An interesting thing is that the CalcModelPredictionFlat
function that accepts only float **floatFeatures
and then simply calls *floatFeatures
, works perfectly fine when passing PointerByReference
.
UPDATE - 5.5.2018
Part 1
After trying to debug the segfault by slightly modifying the original Catboost .cpp and .h files and recompiling the libcatboost.so library, I found out that the segfault was due to me mapping size_t
in C to int
in Java. After fixing this, my interface function in Java looks like this:
Where the size_t
Class is defined as follows:
Part 2
Looking more into the Catboost code, I've noticed that **floatFeatures
are being accessed by rows, like floatFeatures[i]
while ***catFeatures
are accessed by rows and columns, like catFetures[i][catFeatureIdx]
.
After changing floatFeatures
in Java to an array of Pointer
, my code started to work with the model trained without categorical features, i.e. catFeatures
length is zero.
This trick, however, didn't work with catFeatures
that are accessed through a double subscript operator [i][catFeatureidx]
. So for now, I modified the original Catboost code so that it would accept char **catFeatures
- an array of strings. In Java interface function, I set String[] catFeatures
. Now I can make predictions for one element at a time, which is not ideal.