问题标签 [accord.net]

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.

0 投票
0 回答
459 浏览

c# - 创建一个 HaarCascade 以输出百分比,而不是在超过阈值时输出“真”

我的目标是使用我的网络摄像头捕捉我的脸并通过面部表情检测我的情绪。输出应该是概率,比如 70% 快乐,10% 悲伤,......

我的方法:非常高兴和非常悲伤(和其他状态)的面孔应该保存在 HaarCascade 中。

我的问题有两个:

  1. 如何创建一个 HaarCascade 与 HaarObjectDetector 一起使用,以便 HaarObjectDetector 对象在超过阈值时输出百分比而不是输出“真”?
  2. 如何为 HaarCascade 创建 HaarCascade?String path = @"C:\Users\haarcascade-frontalface_alt2.xml"; HaarCascade cascade1 = HaarCascade.FromXml(path);使用opencv-xml更容易还是使用生成它更容易HaarCascade m = new HaarCascade(20,20,HaarCascadeStages);?HaarCascadeStages 会是什么?

其他人是否已经解决了这个问题并提供了 c# 的源代码?

我当前的代码:

0 投票
2 回答
359 浏览

c# - 在没有 PCA 的多类 svm 中找到正确的特征

我正在使用多类 svm(一对一)、3 个类对用户进行分类。在二进制中,我将能够为不同的训练集绘制超计划方程中每个特征的权重分布。在这种情况下,我真的不需要 PCA 来查看超计划的稳定性和特征的相对重要性(减少居中 btw)。多类 svm 中的替代方案是什么,对于每个训练集,您有 3 个分类器,并且您根据三个分类器的结果选择一个类(已经是什么?出现最多次数或更大判别式的类? 在这里并不重要)。任何人都有想法。

如果重要的话,我正在用 Accord 用 C# 编写。谢谢 !

0 投票
1 回答
1649 浏览

c# - 在 Accord.net 框架中使用 Liblinear 进行多重分类

我需要使用 Liblinear 实现多分类分类器。Accord.net 机器学习框架提供了除 Crammer 和 Singer 的多类分类公式之外的所有 Liblinear 属性。这就是过程

0 投票
2 回答
2619 浏览

c# - How to apply feature reduction using principal component analysis? (C#, Accord)

I'm trying to implement PCA via the Accord framework in order to achieve dimension reduction aka feature reduction. Basically, I have one big matrix containing over 23000 features. These are all features that have been extracted from a set of documents. A really simple overview of that matrix would look like this:

The numbers in the matrix correspond to the Term Frequency - Inverse Document Frequency that we have calculated within our program. Basically this shows us how many times that term occurs in a certain document. This is useful information for us, since we will need it to determine which term in our matrix can be used as a feature for classification later on.

Since we have approximately 23000 possible features(and that # will only increase in the future) we need to reduce this to let's say +- 20 features (needed for classification later on). In order for us to realize this, we need to use something that reduces the number of features/dimensions. So we did some searching and came across the accord framework, kernel PCA, ALGLIB, etc. They're all pretty vague to us since we don't have any background in PCA and we're far from mathematicians.

So we opted to use the Accord framework since it looks simple to implement, by using the following code for testing purposes:

This code will print the matrix that resulted from the Transform method in the console. Since we didn't really understand what all the numbers mean and how they would help to reduce the features, we decided to have a look at the Components matrix in a datagridview, by using this code on the exact same matrix as the previous code example:

This returns the proportion, cumilative proportion, singular value and eigenvalue. Again, no clue.

So how do we apply this principle to reduce our matrix of +- 23000 terms to +- 20?

0 投票
1 回答
1809 浏览

c# - 使用 C# 和“Accord.NET”的非线性支持向量回归

在 Accord 中使用 C# 进行非线性向量回归应该使用什么?谢谢(traininginputs double[][] 和 trainingoutput double[] NOT int[])

0 投票
1 回答
703 浏览

c# - 近似神经网络的最佳设置?

我是一名编程爱好者,所以请原谅我并帮助填补任何空白。据我了解,神经网络的良好结果需要 sigmoid 和学习率或步率(取决于训练方法)与学习迭代一起正确设置.

虽然有很多关于这些价值观和泛化原则以及避免过度拟合的教育,但似乎并没有太多关注它们与数据和网络的关系。

我注意到样本、神经元和输入的数量似乎与这些设置最适合的地方成比例。(例如,更多或更少的输入可能会改变迭代 req)。

有没有一种数学方法可以根据已知值(例如样本、输入、输出、层等)为 sigmoid、学习率、步骤、迭代等找到一个好的(近似)起点?

0 投票
2 回答
786 浏览

c# - 动态时间规整内核返回错误率大于 0 的 SVM

我在研究中使用 Accord.net。我有一个可变大小的向量序列作为输入,因此我使用 DynamicTimeWarping 作为 MulticlassSupportVectorMachine 的内核。

输入和输出如下所示:

使用该代码,错误返回为 0.5。

问题:

  1. 这是否意味着我的训练数据存在问题?

  2. 是否有任何其他内核可以用于我的可变大小序列?

谢谢。

0 投票
1 回答
113 浏览

accord.net - Why doesn't PartialLeastSquaresAnalysis (in Accord.Statistics.Analysis) have a Save method?

Net users,

How can I persist an instance of the PartialLeastSquaresAnalysis class? Other classes (e.g. KernelSupportVectorMachine) have a Save method so that we can persist the object to the disk. Since PartialLeastSquaresAnalysis does not have a Save method, is there another way to persist this classs?

Thanks for your help.

Charles

0 投票
1 回答
1242 浏览

c# - 重新创建 Accord.NET DecisionTree 网站示例 - 给定字典中不存在的键

我正在按照 Accord.net 网站上的示例进行操作:

链接到示例,滚动到底部

我的代码是网站示例代码的副本。我包含了正确的 NuGet 包。

我得到这个例外:

在这行代码:

我从哪里开始解决这个问题?我已经检查了调试器中的密码本,它包含了应有的元素。

0 投票
1 回答
3340 浏览

c# - Accord.NET多类SVM分类Kernel如何解决Out of memory异常

我想使用Nursery 数据来训练 SVM(8 个属性和 5 个类),对 C45 学习类使用相同的逻辑,如示例所示

例如,数据是从包含8 个属性的苗圃数据中加载"parents", "has_nurs", "form", "children", "housing", "finance", "social", "health" 的,这些属性的组合导致5 个类之一 "not_recom","recommend", "very_recom","priority","spec_prior"

但是我不知道内核最适合这种 SVM 数据。根据定义,多项式核是一个核函数,它表示特征空间中向量(训练样本)在原始变量多项式上的相似性,允许学习非线性模型。我尝试使用此内核,但在使用数据训练机器时遇到问题。

到目前为止,我使用示例中显示的代码来训练 SVM,并使用了 svm 代码,例如:

但是我在训练机器时遇到错误,我错过了什么?

在此处输入图像描述

编辑

我现在有其他问题,尝试 Cesar 的代码我得到了这个

在此处输入图像描述