使用决策树
我知道 tl;dr;
我将尝试解释我的问题,而不会用大量蹩脚的代码来打扰您。我正在做一项学校作业。我们有蓝精灵的图片,我们必须通过前景背景分析来找到它们。我有一个 Java 决策树,其中包含所有数据(HSV 直方图)1 一个节点。然后尝试找到最佳属性(从直方图数据)来分割树。然后执行分割并创建左子树和右子树,并将数据分割到两个节点树上。所有数据仍然保存在主树中,以便能够计算基尼指数。
因此,在分析了蓝精灵 26 分钟后,我的电脑上有一棵巨大的树,其中包含分裂和其他数据。现在我的问题是,任何人都可以给我一个关于如何分析新图片并确定哪些像素可能是“蓝精灵像素”的全局概念。我知道我必须使用新蓝精灵的 HSV 直方图生成新的数据点数组,然后我需要使用生成的树来确定哪些像素属于蓝精灵。
谁能指导我如何做到这一点?
一些附加信息。
每个决策树对象都有一个 Split 对象,该对象具有分割的最佳属性、分割的值和基尼指数。
如果我需要提供任何其他信息,我想听听。
I know tl;dr;
I'll try to explain my problem without bothering you with ton's of crappy code. I'm working on a school assignment. We have pictures of smurfs and we have to find them with foreground background analysis. I have a Decision Tree in java that has all the data (HSV histograms) 1 one single node. Then tries to find the best attribute (from the histogram data) to split the tree on. Then executes the split and creates a left and a right sub tree with the data split over both node-trees. All the data is still kept in the main tree to be able to calculate the gini index.
So after 26 minutes of analysing smurfs my pc has a giant tree with splits and other data. Now my question is, can anyone give me a global idea of how to analyse a new picture and determine which pixels could be "smurf pixels". I know i have to generate a new array of data points with the HSV histograms of the new smurf and then i need to use the generated tree to determine which pixels belong to a smurf.
Can anyone give me a pointer on how to do this?
Some additional information.
Every Decision Tree object has a Split object that has the best attribute to split on, the value to split on and a gini index.
If i need to provide any additional information I'd like to hear it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的。基本上,在未优化的伪代码中: 为了标记新图像中的像素:
对于新图像中的每个像素:
我希望这在您的上下文中有意义。
OK. Basically, in unoptimized pseudo-code: In order to label pixels in a new image:
For each pixel in the new image:
I hope this makes sense in your context.