如何从Matlab调用python和sklearn? [英] how to call python and sklearn from matlab?
本文介绍了如何从Matlab调用python和sklearn?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在matlab上调用sklearn函数. 我听说在调用numpy函数时存在一些问题,并且sklearn基于numpy.
I need to call sklearn function on matlab. I have heard that there are some problems in calling numpy function and sklearn is based on numpy.
关于这方面有任何指南吗?
Is there any guide about that?
推荐答案
对于Python,我看到了不同的解决方案:
For Python I see different solutions:
-
Windows平台上的
- COM.这需要注册一个应用程序,检查是否可行并允许在群集中使用.
- XMLRPC或SOAP.您可能需要在Matlab中使用Java类,但是您已经意识到这很简单.验证集群中是否有可用的Java VM,并且其中的许多VM在没有Java的情况下运行matlab.
- 您可以将python代码嵌入到c/c ++中,从而允许您编写运行c代码的mex函数: http://docs.python.org/2/extending/embedding.html
- 使用IronPython创建.Net程序集,matlab支持.net
- COM on Windows platforms. This requires to register an application, check if this is possible and allowed on the cluster.
- XMLRPC or SOAP. You may need to use Java-Classes in Matlab, but as you already realised this is very simple. Verify that the cluster has a Java VM available, many run matlab without java.
- You can embed python code into c/c++, which allows you to write mex functions which run c code: http://docs.python.org/2/extending/embedding.html
- Create a .Net assembly using IronPython, matlab supports .net
这篇关于如何从Matlab调用python和sklearn?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文