File Exchange

## Logistic Regression for Classification

version 1.0.0.0 (6.3 KB) by Mo Chen

### Mo Chen (view profile)

Logistic regression for both binary and multiclass classification

Updated 08 Mar 2016

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).

### Cite As

Mo Chen (2020). Logistic Regression for Classification (https://www.mathworks.com/matlabcentral/fileexchange/55863-logistic-regression-for-classification), MATLAB Central File Exchange. Retrieved .

Renwick Beattie

### Renwick Beattie (view profile)

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.

Arshia Sehgal

Ran Sun

### Ran Sun (view profile)

Kathryn Hollowood

### Kathryn Hollowood (view profile)

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

Leah Shi

Quoc Pham

### Quoc Pham (view profile)

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

### rolan worse (view profile)

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

Jorrit Montijn

### Jorrit Montijn (view profile)

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

Chi-Fu

### Chi-Fu (view profile)

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