open source (or otherwise) versions of Matlab toolboxes [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered w开发者_开发百科ith facts and citations.
Closed 7 years ago.
Improve this questionI have a project in a course at the university that requires various Matlab functions. My version of Matlab is supplied by my workplace, and it doesn't have some of the toolboxes that are required for the project. Is there some repository of such implementations anywhere? I couldn't find anything relevant when I googled.
While my question is general, I'm listing the functions that I need and can't find, since my question is also specific:
knnclassify
- an implementation of K-nearest neighborssvmclassify
- an implementation of Support Vector Machinessvmtrain
- part of the SVM implementationmapstd
- normalizes a matrix to have a mean of 0 and standard deviation of 1
An alternative I'm considering is working in Python with Numpy and Pylab. Are there toolboxes in Pylab that are equivalent to these Matlab functions?
The first place I would check is the MathWorks File Exchange. There are over 10,000 code submissions from MATLAB users, and you may be able to find alternatives to the various MATLAB toolboxes. Here's something that may be helpful:
- Luigi Giaccari has a few highly-rated submissions related to KNN searching here, here, and here.
Another alternative for a simpler function like MAPSTD is to try and implement a stripped-down version of it yourself. Here's some sample code that replicates the basic behavior of 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);
This obviously won't cover all of the options in MAPSTD, but captures the basic functionality. I can confirm that the above code gives the same result as mapstd(M)
.
You might want to consider getting your own copies of Matlab and the toolboxes you need. Mathworks has VERY attractive pricing for University students.
GNU Octave is the free Matlab more-or-less-work-alike. I don't know how well the toolboxes are covered.
Alternatively, if the assignment needs them, the school probably has them on some lab machines somewhere, and you MIGHT be able to login remotely, using an Xterm of some kind. Ask the TA.
You could also look at R which is very strong in many data-driven fields, including Machine Learning.
Also of note is the MLOSS directory of open-source machine learning software.
精彩评论