问题标签 [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 投票
1 回答
1010 浏览

cluster-analysis - 我使用 Accord.Net K-Means 分类得到不一致的结果

我有一个测试程序不能为 Accord.Net K-Means 提供一致的结果。

我附上了一个可在 Visual Studio 2013 中运行的可重现测试程序。

该程序是一个控制台应用程序,要重现您需要参考的结果:

来自 Accord.Net 2.15 库。

当我多次运行该程序时,每次都会得到不同的结果。该程序使用经典的 Fisher Iris 数据集。数据集有 150 行,我将数据拆分为 120 行训练数据和 30 行测试数据。

当我运行该程序时,我可能会在 30 个中得到正确分类的 26 个。再次运行它可能会产生 30 次中的 2 次正确。

例如:

我想知道我是否正确使用了 Accord.Net。任何帮助将不胜感激。

我的程序是:

0 投票
2 回答
525 浏览

c# - How to solve OutOfMemoryException that is thrown using principal component analysis

I'm working on a project in C# that uses Principal Component Analysis to apply feature reduction/dimension reduction on a [,]matrix. The matrix columns are features (words and bigrams) that have been extracted from a set emails. In the beginning we had around 156 emails which resulted in approximately 23000 terms and everything worked as it was supposed to using the following code:

The components we received were classified later on using Linear Discriminant Analysis' Classify method from the Accord.NET framework. Everything was working as it should.

Now that we have increased the size of out dataset (1519 emails and 68375 terms) we at first were getting some OutOfMemory Exceptions. We were able to solve this by adjusting some parts of our code until we were able to reach the part where we calculate the PCA components. Right now this takes about 45 minutes which is way too long. After checking the website of Accord.NET on PCA we decided to try and use the last example that uses a covariance matrix since it says: "Some users would like to analyze huge amounts of data. In this case, computing the SVD directly on the data could result in memory exceptions or excessive computing times". Therefore we changed our code to the following:

This however raises an System.OutOfMemoryException. Does anyone know how to solve this problem?

0 投票
1 回答
754 浏览

vb.net - 在 Accord.Net 中使用 AdaBoost(Boosting)

我正在尝试在 Accord.Net 中使用 adaboost(或 boosting)。我为决策树尝试了https://github.com/accord-net/framework/wiki/Classification给出的示例版本,它适用于以下代码:

现在我想添加此代码以在更复杂的示例中使用 adaboost 或 boosting。我通过在上面的代码中添加以下内容来尝试以下操作:

问题似乎是这条线:

如何在 Accord.Net 中使用 adaboost 或 boosting?如何调整我的代码以使其正常工作?所有帮助将不胜感激。

0 投票
1 回答
393 浏览

f# - 当没有可行的解决方案时,Accord.net Cobyla 求解器返回成功

我正在使用 Accord.Net 的 Cobyla 求解器来解决一个相当简单的非线性问题。在某些情况下,该问题将没有可行的点。当我运行一个明显不可行的简单问题时,即使解决方案不可行,求解器也会返回“成功”。

考虑以下用 F# 编写的示例:

求解器找到的解决方案是 4.5,这显然违反了第一个和第二个约束,但是求解器状态是“成功的”。

这是一个错误/功能吗?任何解决方法?

0 投票
1 回答
3634 浏览

accord.net - 如何使用 Accord.Net 进行文本分类?

我正在尝试使用accord.net 进行文本分类。但我找不到表示稀疏向量和矩阵的方法。例如,我们有很多文本,在使用 ngram 和散列进行标记化之后,每个文本都表示为具有权重 (tf) 的特征索引(由 featureHasher 给出)。并且不可能将所有数据作为非稀疏矩阵加载到内存中。有没有办法进行增量处理或表示稀疏矩阵或使用稀疏数据进行特征缩减?

0 投票
0 回答
427 浏览

machine-learning - 我如何训练 HMM 进行连续手语识别

目前,我可以通过为每个符号训练一个 HMM 模型来使用 HMM 识别孤立的词,对于一个新词,我将符号用于给出最高可能性的模型。

当涉及到多个单词连接在一起时,我不知道该怎么办?我知道我应该使用维特比算法,但我不知道我不知道连续流中每个标志的开始和结束有多特别,还有一些来自标志末端和下一个标志的开始

我正在使用 C# Accord.Net 库。

更具体地说,我的问题是:

我如何训练 HMM 分类器以自动解码“单词”的连续序列(并注意每个 hmms 代表一个单词),考虑到在实时流中并非序列的每个片段都是一个单词,有些片段不是文字,如果这是通过维特比算法完成的,那么隐藏状态的假定序列是什么我怎么能得到它,因为根据我有限的信息,隐藏状态的序列长度等于观察状态的序列长度,并且在在这种情况下,每个隐藏状态(单词)都会发出一系列观察点。

提前致谢

0 投票
0 回答
250 浏览

.net-3.5 - .NET 3.5 的 Accord.NET 版本是什么?

我正在使用 .NET 3.5。我需要使用 Accord.Math。我安装了 Accord.NET 2.7.1、2.8.1、2.11 和 2.15。但他们都没有工作。错误消息是:找不到类型或命名空间名称“Accord”(您是否缺少 using 指令或程序集引用?)

有谁知道 Accord.Math 的哪个版本与 .NET3.5 一起使用?

0 投票
1 回答
905 浏览

c# - 从不同的 Dll 文件访问内部类

我对一些不应该工作的代码感到困惑,但奇怪的是,它正在工作,我知道我只是忽略了一些明显的东西。我正在查看Accord.NET框架的源代码,我下载了它并且编译得很好,但我对某些事情感到困惑。在其中一个名为 Accord.Math 的程序集中,有一个名为Indices.cs的文件。这是定义:

您可以在第 35 行看到这一点。

在另一个名为 Accord.Statistics 的程序集中,有一个名为Tools.cs的文件。在该文件中,有这一行:

您可以在第 329 行看到这一点。

我对这条线如何引用Accord.Math.Indices该类感到困惑,因为它被标记为internal. 我的理解是,标记为的类internal只能由驻留在同一 DLL 文件中的类访问。有人可以解释这是如何工作的吗?

0 投票
1 回答
188 浏览

c# - 在循环中构造函数约束

我正在使用accord.math 来解决具有非线性约束的系统。在这个例子中,约束有 4 个变量, x => x[0] + x[1] + x[2] + x[3] <= 1但是如果约束应该包括 50 个变量呢?如何构建, x => x[0] + x[1] + x[2] + ...+ x[50] <= 1循环?

0 投票
3 回答
1764 浏览

c# - 如何保存 Accord.Net K-Means 的聚类结果以供重复使用?

我正在尝试保存 Accord.Net K-Means 的聚类结果,这样我每次运行程序时都不必重新计算。

我还想为每个集群分配永久的人类可读标签。如果我每次都必须计算集群,这是不可能的。