简体   繁体   English

如何测试机器学习或统计NLP算法实现包?

[英]How to test an Machine Learning or statistic NLP algorithm implementation pack?

I am working on testing several Machine Learning algorithm implementations, checking whether they can work as efficient as described in the papers and making sure they could offer a great power to our statistic NLP (Natural Language Processing) platform. 我正在测试几种机器学习算法实现,检查它们是否可以像论文中描述的那样高效工作,并确保它们可以为我们的统计NLP(自然语言处理)平台提供强大的功能。

Could u guys show me some methods for testing an algorithm implementation? 你们能告诉我一些测试算法实现的方法吗? 1)What aspects? 1)哪些方面? 2)How? 2)如何? 3)Do I have to follow some basic steps? 3)我必须遵循一些基本步骤吗? 4)Do I have to consider diversity specific situations when using different programming languages? 4)在使用不同的编程语言时,我是否必须考虑多样性特定的情况? 5)Do I have to understand the algorithm? 5)我必须了解算法吗? I mean, does it offer any help if I really know what the algorithm is and how it works? 我的意思是,如果我真的知道算法是什么以及它是如何工作的,它能提供任何帮助吗?

Basically, we r using C or C++ to implement the algorithm and our working env is Linux/Unix. 基本上,我们使用C或C ++来实现算法,我们的工作环境是Linux / Unix。 Our testing methods only focus on black box testing and testing input/output of functions. 我们的测试方法只关注黑盒测试和测试功能的输入/输出。 I am eager to improve them but I dont have any better idea now... 我渴望改进它们,但我现在没有更好的主意......

Great Thx!! 太棒了! LOL 大声笑

For many machine learning and statistical classification tasks, the standard metric for measuring quality is Precision and Recall . 对于许多机器学习和统计分类任务,测量质量的标准度量是精确和召回 Most published algorithms will make some kind of claim about these metrics, or you could implement them and run these tests yourself. 大多数已发布的算法会对这些指标做出某种声明,或者您可以实现它们并自行运行这些测试。 This should provide a good indicative measure of the quality you can expect. 这应该是您可以期望的质量的良好指示性衡量标准。

When you talk about efficiency of an algorithm, this is usually some statement about the time or space performance of an algorithm in terms of the size or complexity of its input (often expressed in Big O notation ). 当您谈论算法的效率时,这通常是关于算法在其输入的大小或复杂性方面的时间或空间性能的一些陈述(通常以Big O表示法表示 )。 Most published algorithms will report an upper bound on the time and space characteristics of the algorithm. 大多数已发布的算法将报告算法的时间和空间特征的上限。 You can use that as a comparative indicator, although you need to know a little bit about computational complexity in order to make sure you're not fooling yourself. 您可以将其用作比较指标,尽管您需要了解一点计算复杂性,以确保您不会欺骗自己。 You could also possibly derive this information from manual inspection of program code, but it's probably not necessary, because this information is almost always published along with the algorithm. 您也可以从手动检查程序代码中获取此信息,但可能没有必要,因为此信息几乎总是与算法一起发布。

Finally, understanding the algorithm is always a good idea. 最后,理解算法总是一个好主意。 It makes it easier to know what you need to do as a user of that algorithm to ensure you're getting the best possible results (and indeed to know whether the results you are getting are sensible or not), and it will allow you to apply quality measures such as those I suggested in the first paragraph of this answer. 它使您更容易知道您作为该算法的用户需要做什么,以确保您获得最佳结果(并确实知道您获得的结果是否合理),并且它将允许您应用我在本答复第一段中建议的质量措施。

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

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