File Exchange

image thumbnail

Logistic Regression for Classification

version 1.0.0.0 (6.3 KB) by Mo Chen
Logistic regression for both binary and multiclass classification

21 Downloads

Updated 08 Mar 2016

View License

This package provides logistic regression functions for both binary and multiclass classification problems.
This package is now a part of the PRML toolbox (http://www.mathworks.com/matlabcentral/fileexchange/55826-pattern-recognition-and-machine-learning-toolbox).

Comments and Ratings (10)

Same error mentioned below, simple to fix (input t was not in correct orientation) - this should have been captured by input parsing at the start of the function. No NaN handling. No computation of standard errors, probabilities calculated do not match reality.

Ran Sun

I'm having the same problem as Quoc Pham and Muhammad Tariq Sadiq. Any advice on this?

Leah Shi

Quoc Pham

I got the same problem like Muhammad Tariq Sadiq, please advise!

Dear Sir, I am using following commands of your MATLAB codes

[model,llh]=logitBin(features,y);
plot(llh);
ytest = logitBinPred(model,features);
binPlot(model,features,ytest)

where features have length of 72*10 double and y have 72*1 double and representing class label.

When i execute the above code, I got following error

Error using -
Matrix dimensions must agree.

Error in logitBin (line 32)
g = X*(y-t)'+lambda.*w; % 4.96

Kindly suggest me how to remove it

rolan worse

t: 1 x n label (1~k)????

Great work! This saved me several hours, writing the code from Bishop myself.

Chi-Fu

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux