Code covered by the BSD License  

Highlights from
Machine Learning with MATLAB

4.7 | 6 ratings Rate this file 217 Downloads (last 30 days) File Size: 882 KB File ID: #42744
image thumbnail

Machine Learning with MATLAB


Abhishek Gupta


05 Aug 2013 (Updated )

These are the supporting MATLAB files for the MathWorks webinar of the same name.

| Watch this File

File Information

** Update: The webinar recording is available at:

In this webinar you will learn how to get started using machine learning tools to detect patterns and build predictive models from your datasets. In this session, you will learn about several machine learning techniques available in MATLAB and how to quickly explore your data, evaluate machine learning algorithms, compare the results, and apply the best machine learning for your problem.

Highlights include unsupervised and supervised machine learning techniques including:
• K-means and other clustering tools
• Neural Networks
• Decision trees and ensemble learning
• Naïve Bayes Classification
• Linear, logistic and nonlinear regression


Rotate X Labels( Ax, Angle, Varargin ) and Plot Groups Of Stacked Bars inspired this file.

Required Products Fuzzy Logic Toolbox
Neural Network Toolbox
Parallel Computing Toolbox
Statistics Toolbox
MATLAB release MATLAB 8.1 (R2013a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (11)
27 Jan 2015 Gareth Thomas

Gareth Thomas

19 Jan 2015 himakshi Shekhawat

himakshi Shekhawat

hi, I have run your code as i have to do similar work but your code is not reading data from the file bank-full.csv and is returning 0 rows. As the error is
??? Error using ==> cvpartition>cvpartition.cvpartition at 137
The number of observations must be a positive integer greater than one.
I am not able to understand why it is not reading data from rows of csv file

Comment only
10 Dec 2014 Abhishek Gupta

Abhishek Gupta

Hi Azadeh and Saida,

I tried executing all the code in the recent releases of MATLAB and am unable to reproduce the errors. This maybe something specific to your setup. Please contact technical support for further help:

Comment only
08 Dec 2014 Saida


I keep trying to follow your code but the very first line gives me an error.

>> bank=ImportBankData('bank-full.csv');
Undefined function 'ImportBankData' for input arguments of type 'char'.

Comment only
25 Nov 2014 Azadeh


I run MachineLearning.m on sample dataset bank-full.csv and got this error:

Default value is not a member of type "nntype.performance_fcn".
Error using nnetParamInfo (line 28)
Too many input arguments.

Error in patternnet>get_info (line 85)
info = nnfcnNetwork(mfilename,'Pattern Recognition Neural Network',fcnversion, ...

Error in patternnet (line 41)
if isempty(INFO), INFO = get_info; end

Error in NNfun (line 18)
net = patternnet(hiddenLayerSize);

Error in MachineLearning (line 191)
[~, net] = NNfun(XtrainNN,YtrainNN);

Comment only
14 Aug 2014 Mehmet


24 Apr 2014 Abhishek Gupta

Abhishek Gupta

Hi Remi,

The data for the classification example is available here:

I believe that I have mentioned this in the readme.

Comment only
21 Apr 2014 Rémi Larouche

Rémi Larouche

The CSV file is missing ('bank-full.csv').

28 Dec 2013 Wenwu


Thanks, nice webinar and supplementary files.

16 Dec 2013 PRIYA


08 Dec 2013 Sergey


05 Aug 2013

Added webinar link

30 Jul 2014

Updated webinar link

Contact us