I’m implementing softmax regression in Octave. Currently I’m using a non-vectorized implementation using following cost function and derivatives.
Source: Softmax Regression
Now I want to implement vectorized version of it in Octave. It seems like bit hard for me to write vectorized versions for these equations. Can somebody help me to implement this ?
Thanks
Upul
This is very similar to an exercise in Andrew Ng's deep learning class, they give some hints
http://ufldl.stanford.edu/wiki/index.php/Exercise:Vectorization
Related
I am creating a logistic regression model on MATLAB which will be a binary classifier (outcome is the label 'good' or 'bad'). I have found what appears to be two functions which can fit a logistic model:
fitglm()
fitclinear()
Can someone please help me understand the difference? So far I have been using fitclinear and enjoying it.
Thanks
This is not exactly related to programming.
I would like to solve linear programming problem in MATLAB without using the in-built functions like linprog from toolboxes.
Any suggestions or examples are much appreciated.
This question is regarding MATLAB implementation of the solution to IDE.
Consider IDE:
where the K(r',r,\theta) is the Kernel of the integration. Is there a simple implementation of the solution to this kind of equations? I know how to solve it in general, but I'm wondering if you could suggest something simpler and well implemented in MATLAB.
Now, I would like to practice some problem solving by use RCGA (Real Code Genetic Algorithms) in MATLAB. Could any helper provide me some example project matlab files about that ?
Thank you very much.
I wrote an article a few years ago on an application of genetic algorithms in MATLAB, which comes with example data and MATLAB code. Although the example doesn't use real-coding, it does demonstrate how to apply a custom chromosomal coding, so perhaps it would be a starting point for you that you could adapt.
I have a homework to classify multi-class images with Support Vector Machines. I am not allowed to use any toolbox, I have to write SVM code by my self. I have to implement it in MATLAB. Since I am not familiar with MATLAB, I have some troubles about implementing.
Can you suggest me any pseudocode or paper that explains the svm implementation basically? I mean I know the theory of SVM but I am just not good at programming. Or any SVM code might be very helpful!
Thank you for your help in advance.
I like using LibSVM library. On its web pages you can find some useful hints and descriptions of the SVM. There is also beginner's guide to SVM classification. The source code itself should be available as well.
http://www.csie.ntu.edu.tw/~cjlin/libsvm/