MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   Matlab工具箱的开源(或其他)版本 (https://www.labfans.com/bbs/showthread.php?t=23023)

poster 2019-12-10 16:49

Matlab工具箱的开源(或其他)版本
 
我在大学的一门课程中有一个项目需要各种Matlab功能。我的Matlab版本是由我的工作场所提供的,它没有项目所需的某些工具箱。是否在任何地方都有此类实现的存储库?我在Google上找不到任何相关内容。

虽然我的问题很笼统,但由于我的问题也很具体,所以我列出了我需要且找不到的功能:
[LIST][*] knnclassify -K近邻的实现[*] svmclassify支持向量机的实现[*] svmtrain -SVM实现的一部分[*] mapstd将矩阵归一化为均值0和标准偏差1[/LIST]我正在考虑的替代方法是在Numpy和Pylab中使用Python。 Pylab中是否有与这些Matlab功能等效的工具箱?


回答:
我首先要检查的是[URL="http://www.mathworks.com/matlabcentral/fileexchange/"]MathWorks File Exchange[/URL] 。 MATLAB用户提交了10,000多个代码,您也许可以找到各种MATLAB工具箱的替代方法。这可能会有所帮助:
[LIST][*] [URL="http://www.mathworks.com/matlabcentral/fileexchange/authors/31779"]Luigi Giaccari[/URL]在[URL="http://www.mathworks.com/matlabcentral/fileexchange/22190-fast-k-nearest-neighbors-search"]这里[/URL] , [URL="http://www.mathworks.com/matlabcentral/fileexchange/22407-k-nearest-neighbours-and-radius-range-search"]这里[/URL]和[URL="http://www.mathworks.com/matlabcentral/fileexchange/24607"]这里[/URL]都有一些与KNN搜索相关的好评。[/LIST]像[URL="http://www.mathworks.com/access/helpdesk/help/toolbox/nnet/mapstd.html"]MAPSTD[/URL]这样的更简单功能的另一种选择是尝试自己实施简化版本。这是一些示例代码,它们复制了MAPSTD的基本行为:

M = magic(5); %# Create an example matrix rowMeans = mean(M,2); %# Compute the row means rowStds = std(M,0,2); %# Compute the row standard deviations rowStds(rowStds == 0) = 1; %# Set standard deviations of 0 to 1 for i = 1:size(M,1) M(i,:) = (M(i,:)-rowMeans(i))./rowStds(i); %# Normalize each row of M end %# Or you could avoid the for loop with a vectorized solution... M = bsxfun(@rdivide,bsxfun(@minus,M,rowMeans),rowStds); 显然,这不会涵盖MAPSTD中的所有选项,而是介绍了基本功能。我可以确认上述代码给出的结果与mapstd(M) 。



[url=https://stackoverflow.com/questions/1981943]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 06:55

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.