Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
MATLAB for Machine Learning

You're reading from   MATLAB for Machine Learning Practical examples of regression, clustering and neural networks

Arrow left icon
Product type Paperback
Published in Aug 2017
Publisher Packt
ISBN-13 9781788398435
Length 382 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Pavan Kumar Kolluru Pavan Kumar Kolluru
Author Profile Icon Pavan Kumar Kolluru
Pavan Kumar Kolluru
Giuseppe Ciaburro Giuseppe Ciaburro
Author Profile Icon Giuseppe Ciaburro
Giuseppe Ciaburro
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Getting Started with MATLAB Machine Learning FREE CHAPTER 2. Importing and Organizing Data in MATLAB 3. From Data to Knowledge Discovery 4. Finding Relationships between Variables - Regression Techniques 5. Pattern Recognition through Classification Algorithms 6. Identifying Groups of Data Using Clustering Methods 7. Simulation of Human Thinking - Artificial Neural Networks 8. Improving the Performance of the Machine Learning Model - Dimensionality Reduction 9. Machine Learning in Practice

How to create a linear regression model

More generally, to create a linear regression model, use the fitlm() function. This function creates a LinearModel object. The object in the workspace has a series of properties that can be immediately viewed by simply clicking on it. Methods such as plot, plotResiduals, and plotDiagnostics are available if you want to create plots and perform a diagnostic analysis.

LinearModel is an object comprising training data, model description, diagnostic information, and fitted coefficients for a linear regression.

By default, fitlm() takes the last variable in the table or dataset array as the response. Otherwise, we have to specify predictors and response variables, for example, as a formula. In addition, we can set a specific column as the response variable by using the ResponseVar name-value pair argument. To use a set of the columns as predictors...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at AU $24.99/month. Cancel anytime