Curriculum Module
Created with R2026a. Compatible with R2026a and later releases.
This curriculum module contains interactive MATLAB® live scripts that introduce machine learning for regression through baseline modeling, model improvement, tree-based methods, and optimization.
You can use these live scripts as lecture demonstrations, in-class activities, or interactive assignments outside class. The lesson sequence starts with baseline linear regression, residual analysis, and cross-validation, then moves to feature engineering and regularization, then to regression trees and ensembles, and finally to optimization and gradient descent for iterative training.
Together, the four scripts show a disciplined regression workflow: start with a simple baseline, diagnose where it fails, improve the representation or model family, and evaluate changes using held-out error metrics. The instructions inside each live script guide students through the exercises one section at a time. To stop a running section midway, use the
Stop button in the RUN section of the Live Editor tab in the MATLAB Toolstrip.
Contact the MathWorks Educator Content Development Team if you would like to provide feedback, or if you have a question.
This module does not assume any prior exposure to the subject of machine learning.
Use the
link to download the module. You will be prompted to log in or create a MathWorks account. The project will be loaded, and you will see an app with several navigation options to get you started.
Download or clone this repository. Open MATLAB, navigate to the folder containing these scripts and double-click on MLforRegression.prj. It will add the appropriate files to your MATLAB path and open an app that asks you where you would like to start.
Ensure you have all the required products (listed below) installed. If you need to include a product, add it using the Add-On Explorer. To install an add-on, go to the Home tab and select
Add-Ons > Get Add-Ons.
MATLAB® is used throughout. Tools from Statistics and Machine Learning Toolbox™, and System Identification Toolbox™ are used frequently as well.
|
Available on: ![]() GitHub |
|
Available on: ![]() GitHub |
Or feel free to explore our other modular courseware content.
Looking for more? Find an issue? Have a suggestion? Please contact the MathWorks Educator Content Development Team. If you want to contribute directly to this project, you can find information about how to do so in the CONTRIBUTING.md page on GitHub.
© Copyright 2026 The MathWorks, Inc










