简体   繁体   English

将多维特征分类为两组的 Neural.network 示例

[英]Neural network example to classify multi-dimensional features into two sets

I'm looking for a good source code example of a supervised neural.network which accepts more than two features (unlike most XY-examples) and classifies data into two sets.我正在寻找一个好的监督神经网络的源代码示例,它接受两个以上的特征(与大多数 XY 示例不同)并将数据分为两组。 From what I've read, a Support Vector Machine (SVM) might be a solution?据我所知,支持向量机 (SVM)可能是一种解决方案?

All the classifying examples I have found are two-dimensional.我发现的所有分类示例都是二维的。 Here are a few:这里有一些:

I'm trying to distinguish rare events from a number of inputs which are normally stable.我试图将罕见事件与许多通常稳定的输入区分开来。 Features are key-value pairs where the value can usually discretized as a small number.特征是键值对,其中的值通常可以离散化为一个小数字。 Available training data for the first category is huge, but with only few training sets for the second category, if that makes a difference.第一类可用的训练数据是巨大的,但第二类只有很少的训练集,如果这有所不同的话。

Example Training Set示例训练集

Category A A类

[2, 1, 0, 1, 4, 3] -> A  
[1, 1, 2, 3, 3, 0] -> A
[0, 0, 1, 3, 2, 0] -> A

Category B B类

[0, 4, 4, 4, 4, 3] -> B

Classifying Example分类示例

[1, 3, 4, 4, 4, 0] -> ??? (probably B)

A confidence rating, eg.信心评级,例如。 "85% certain of B", would be helpful in distinguishing a threshold for a rare event. “85% 确定 B”将有助于区分罕见事件的阈值。

Is a neural.network the best solution and are there any .NET libraries with this built-in? neural.network 是最好的解决方案吗?是否有内置此功能的 .NET 库?

In reality, all these machine learning techniques have their pros and cons. 实际上,所有这些机器学习技术都有其优点和缺点。 In using NN (single layer perceptron), you need to consider if you have enough training data. 在使用NN(单层感知器)时,您需要考虑是否有足够的训练数据。 Technically speaking, you need to be able to cover all cells inside the dimensions to have a good result. 从技术上讲,您需要能够覆盖尺寸内的所有单元以获得良好的结果。

SVM on the other hand, tries to find a border separating your data points so if you have gaps in the areas which are not close to this border, it is fine. 另一方面,SVM尝试找到分隔数据点的边界,这样如果在不接近此边界的区域中有间隙,则可以。

There are 5-6 classifiers around +/- boosting and to be honest, it seems that most of the time type of the classifier is chosen subjectively. 围绕+/-提升有5-6个分类器,说实话,似乎大多数时间类型的分类器是主观选择的。 On the other hand, some people use multiple classifiers and compare the result. 另一方面,有些人使用多个分类器并比较结果。

With OpenCV, it is so easy to pluggin a different classifier so you are on right track for it. 使用OpenCV,可以很容易地插入不同的分类器,因此您可以正确地使用它。 I used OpenCV in C++ with NN classifiers for my project and result was very good: 我在C ++中使用OpenCV和我的项目的NN分类器,结果非常好:

http://www.springerlink.com/content/j0615767m36m0614/ http://www.springerlink.com/content/j0615767m36m0614/

SVM is n-dimensional - it's just that the EXAMPLES are usually 2D, since once you get to any more than 3 the solution doesn't really fit into 2D illustrations anymore. SVM 是 n 维的——只是示例通常是 2D 的,因为一旦超过 3 个,解决方案就不再真正适合 2D 插图了。

It only has two output classes (usually Good and Bad), but it has as many features as you like.它只有两个 output 类(通常是 Good 和 Bad),但它具有您喜欢的任意多的特性。 That's why the line splitting your two SVM classes is called a 'hyperplane', since it exists in multi-dimensional space - one dimension for each feature.这就是为什么分割两个 SVM 类的线被称为“超平面”,因为它存在于多维空间中——每个特征一维。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM