本文介绍了支持向量机-一个简单的解释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我试图了解SVM算法的工作原理,但是我只是想不出如何在n维平面的点上转换某些数据集,这些数据集具有数学意义,以便通过超平面将点分开.对它们进行分类.

So, i'm trying to understand how the SVM algorithm works but i just cannot figure out how you transform some datasets in points of n-dimensional plane that would have a mathematical meaning in order to separate the points through a hyperplane and clasify them.

有一个示例此处,他们正试图对老虎和大象的图片进行分类,他们说我们将它们数字化为100x100像素的图像,所以我们在n维平面上有x,其中n = 10,000",但是我的问题是它们如何变换实际上仅代表某种颜色的矩阵将具有数学意义的点编码为2类?

There's an example here, they are trying to clasify pictures of tigers and elephants, they say "We digitize them into 100x100 pixel images, so we have x in n-dimensional plane, where n=10,000", but my question is how do they transform the matrices that actually represent just some color codes IN points that have a methematical meaning in order to clasify them in 2 categories?

可能有人可以在2D示例中向我解释这一点,因为我看到的任何图形表示都只是2D,而不是nD.

Probably someone can explain me this in a 2D example because any graphical representation i see it's just 2D, not nD.

推荐答案

简短的答案是:它们不对矩阵进行变换,而是将矩阵中的每个元素都视为维度(在机器学习中,每个元素都称为a 功能).因此,他们需要对每个具有100x100 = 10000个特征的元素进行分类.在线性 SVM情况下,他们使用超平面进行操作,将10,000维空间划分为两个不同的区域.

The short answer is: they don't transform the matrices, but treat each element in the matrix as a dimension (in machine learning each element would be called a Feature).Thus, they need classify elements with 100x100 = 10000 features each. In the linear SVM case, they do so using a hyperplane, which divides the 10,000-dimensional space into two distinct regions.

更长的答案是:考虑您的2D情况.现在,您要分离一组二维元素.这意味着您的集合中的每个元素都可以用数学形式描述为2元组,即: e =(x1,x2).例如,在您的图中,一些完整的点可能是: {(1,3),(2,4)} ,而一些空心的点可能是 {(4,2), (5,1)} .请注意,为了使用线性分类器对它们进行分类,您需要一个二维线性分类器,这将产生一个决策规则,看起来可能像这样:

A longer answer would be:Consider your 2D case. Now, you want to separate a set of two-dimensional elements. This means that each element in your set can be described mathematically as a 2-tuple, namely: e = (x1, x2). For example, in your figure, some full dots might be: {(1,3), (2,4)}, and some hollow ones might be {(4,2), (5,1)}. Note that in order to classify them with a linear classifier, you need a 2-dimensional linear classifier, which would yield a decision rule which might look like this:

  • e =(x1,x2)
  • 如果(w1 * x1 + w2 * x2)> C:确定e是一个完整的点.
  • 否则:e是空心的.

请注意,分类器是线性,因为它是e元素的线性组合. "w"称为权重","C"为决策阈值.上面具有2个元素的线性函数只是一条直线,这就是为什么在您的图中H是直线.

Note that the classifier is linear, as it is a linear combination of the elements of e. The 'w's are called 'weights', and 'C' is the decision threshold. a linear function with 2-elements as above is simply a line, that's why in your figures the H's are lines.

现在,回到我们的n维案例,您可能会想到我们这条线将无法解决问题.在3D情况下,我们需要一个平面:(w1 * x1 + w2 * x2 + w2 * x3)> C,在n维情况下,我们需要一个超平面:(w1 * x1 + w2 * x2 + ... + wn * xn)> C,这真是难以想像,但绘制:-)仍然如此.

Now, back to our n-dimensional case, you can probably figure our that a line will not do the trick. In the 3D case, we would need a plane: (w1 * x1 + w2 * x2 + w2 * x3) > C, and in the n-dimensional case, we would need a hyperplane: (w1 * x1 + w2 * x2 + ... + wn * xn) > C, which is damn hard to imagine, none the less to draw :-).

这篇关于支持向量机-一个简单的解释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-01 08:56