-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Maintenance of Live Modules Update for 2024b+.
- Updated CI - Updated Smoke Tests - Plotting hard-coded color updates - Project structure updates
- Loading branch information
Showing
29 changed files
with
569 additions
and
371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"schemaVersion":1,"label":"Tested with","color":"success","message":"R2021a | R2021b | R2022a | R2022b | R2023a | R2023b"} | ||
{"schemaVersion":1,"label":"Tested with","color":"success","message":"R2024a | R2024b"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,96 +1,102 @@ | ||
|
||
<a name="T_DEF03274"></a> | ||
# <span style="color:rgb(213,80,0)">Machine Learning for Regression</span> | ||
<a name="H_053613DF"></a> | ||
|
||
[![View on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/95903-machine-learning-for-regression) or [![Open in MATLAB Online](https://www.mathworks.com/images/responsive/global/open-in-matlab-online.svg)](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Machine-Learning-for-Regression&project=MLforRegression.prj&file=README.mlx) | ||
|
||
![MATLAB Versions Tested](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FMathWorks-Teaching-Resources%2FMachine-Learning-for-Regression%2Frelease%2FImages%2FTestedWith.json) | ||
|
||
**Curriculum Module** | ||
|
||
_Created with R2021a. Compatible with R2021a and later releases._ | ||
|
||
# Information | ||
|
||
This curriculum module contains interactive [MATLAB® live scripts](https://www.mathworks.com/products/matlab/live-editor.html) that teach the basics of machine learning for regression. | ||
|
||
<a name="H_F00D98E4"></a> | ||
## Background | ||
|
||
You can use these live scripts as demonstrations in lectures, class activities, or interactive assignments outside class. This module covers the difference between regression, classification, and clustering, as well as feature engineering and feature extraction, overfitting and underfitting, and a variety of machine learning models commonly used for regression. It also includes a detailed example of applying regression models for electricity load forecasting using real-world data. | ||
|
||
|
||
The instructions inside the live scripts will guide you through the exercises and activities. Get started with each live script by running it one section at a time. To stop running the script or a section midway (for example, when an animation is in progress), use the <img src="Images/image_0.png" width="19" alt="image_0.png"> Stop button in the **RUN** section of the **Live Editor** tab in the MATLAB Toolstrip. | ||
|
||
## Contact Us | ||
|
||
Solutions are available upon instructor request. Contact the [MathWorks teaching resources team](mailto:[email protected]) if you would like to request solutions, provide feedback, or if you have a question. | ||
|
||
<a name="H_30BC7141"></a> | ||
## Prerequisites | ||
|
||
This module does not assume any prior exposure to the subject of machine learning. | ||
|
||
<a name="H_330E72C3"></a> | ||
## Getting Started | ||
### Accessing the Module | ||
### **On MATLAB Online:** | ||
|
||
Use the [<img src="Images/image_1.png" width="136" alt="image_1.png">](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Machine-Learning-for-Regression&project=MLforRegression.prj) 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. | ||
|
||
### **On Desktop:** | ||
|
||
Download or clone this repository. Open MATLAB, navigate to the folder containing these scripts and double-click on [MLforRegression.prj](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](#H_E850B4FF)) 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 <img src="Images/image_2.png" width="16" alt="image_2.png"> **Add-Ons** > **Get Add-Ons**. | ||
|
||
<a name="H_E850B4FF"></a> | ||
## Products | ||
|
||
MATLAB® is used throughout. Tools from Statistics and Machine Learning Toolbox™ are used frequently as well. | ||
|
||
<a name="H_E8C62B23"></a> | ||
# Scripts | ||
|
||
*If you are viewing this in a version of MATLAB prior to R2023b, you can view the learning outcomes for each script* [*here*](https://www.mathworks.com/matlabcentral/fileexchange/95903-machine-learning-for-regression) | ||
|
||
## [**MachineLearningIntro.mlx**](Scripts/MachineLearningIntro.mlx) | ||
| <img src="Images/image_3.png" width="171" alt="image_3.png"> | **In this script, students will...** <br>- Learn the difference between regression, classification, and clustering <br>- Define feature engineering/extraction <br>- Identify and use different machine learning models commonly used for regression <br>- Be able to explain overfitting and underfitting | | ||
| :-- | :-- | | ||
|
||
## [**LoadForecastRegression.mlx**](Scripts/LoadForecastRegression.mlx) | ||
| <img src="Images/image_4.png" width="171" alt="image_4.png"> | **In this script, students will...** <br>- Apply the machine learning workflow to solve a problem in time series forecasting <br>- Engineer appropriate features to solve the forecasting problem <br>- Validate and compare different types of regression models <br>- Test and evaluate the trained model to make predictions | | ||
| :-- | :-- | | ||
|
||
## [**FE1_ProgrammaticML.mlx**](Scripts/FE1_ProgrammaticML.mlx) **and** [**FE2_LoadForecastDL.mlx**](Scripts/FE2_LoadForecastDL.mlx) | ||
| <img src="Images/image_5.png" width="371" alt="image_5.png"> | **In these scripts, students will...** <br>- Expand on the practical problem presented in [LoadForecastRegression.mlx](Scripts/LoadForecastRegression.mlx) <br>- Define feature engineering/extraction <br>- Identify and use different machine learning models commonly used for regression <br>- Be able to explain overfitting and underfitting | | ||
| :-- | :-- | | ||
|
||
# Related Courseware Modules | ||
<a name="H_61EB2540"></a> | ||
## [**Regression Basics**](https://www.mathworks.com/matlabcentral/fileexchange/93435-regression-basics) | ||
| <img src="Images/image_6.png" width="171" alt="image_6.png"> | **Available on:**[<img src="Images/image_7.png" width="129" alt="image_7.png">](https://www.mathworks.com/matlabcentral/fileexchange/93435-regression-basics)[<img src="Images/image_8.png" width="130" alt="image_8.png">](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Regression-Basics&project=RegressionBasics.prj)[GitHub](https://github.com/MathWorks-Teaching-Resources/Regression-Basics) | | ||
| :-- | :-- | | ||
|
||
<a name="H_5F86F1DE"></a> | ||
## [**Machine Learning Methods: Clustering**](https://www.mathworks.com/matlabcentral/fileexchange/135381-machine-learning-methods-clustering) | ||
| <img src="Images/image_9.png" width="171" alt="image_9.png"> | **Available on:**[<img src="Images/image_10.png" width="129" alt="image_10.png">](https://www.mathworks.com/matlabcentral/fileexchange/135381-machine-learning-methods-clustering)[<img src="Images/image_11.png" width="130" alt="image_11.png">](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Machine-Learning-Methods-Clustering&project=MLMethodsClustering.prj)[GitHub](https://github.com/MathWorks-Teaching-Resources/Machine-Learning-Methods-Clustering) | | ||
| :-- | :-- | | ||
|
||
|
||
Or feel free to explore our other [modular courseware content](https://www.mathworks.com/matlabcentral/fileexchange/?q=tag%3A%22courseware+module%22&sort=downloads_desc_30d). | ||
|
||
# Educator Resources | ||
- [Educator Page](https://www.mathworks.com/academia/educators.html) | ||
<a name="H_0FA5DA18"></a> | ||
# Contribute | ||
|
||
Looking for more? Find an issue? Have a suggestion? Please contact the [MathWorks teaching resources team](mailto:%[email protected]). If you want to contribute directly to this project, you can find information about how to do so in the [CONTRIBUTING.md](https://github.com/MathWorks-Teaching-Resources/Machine-Learning-for-Regression/blob/release/CONTRIBUTING.md) page on GitHub. | ||
|
||
|
||
*©* Copyright 2023 The MathWorks™, Inc | ||
|
||
|
||
|
||
|
||
# <span style="color:rgb(213,80,0)">Machine Learning for Regression</span> | ||
|
||
|
||
[![View on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/95903-machine-learning-for-regression) or [![Open in MATLAB Online](https://www.mathworks.com/images/responsive/global/open-in-matlab-online.svg)](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Machine-Learning-for-Regression&project=MLforRegression.prj&file=README.mlx) | ||
|
||
[![MATLAB Versions Tested](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FMathWorks-Teaching-Resources%2FMachine-Learning-for-Regression%2Frelease%2FImages%2FTestedWith.json)](https://MathWorks-Teaching-Resources.github.io/Machine-Learning-for-Regression) | ||
|
||
**Curriculum Module** | ||
|
||
_Created with R2024b. Compatible with R2024b and later releases._ | ||
|
||
# Information | ||
|
||
This curriculum module contains interactive [MATLAB® live scripts](https://www.mathworks.com/products/matlab/live-editor.html) that teach the basics of machine learning for regression. | ||
|
||
|
||
## Background | ||
|
||
You can use these live scripts as demonstrations in lectures, class activities, or interactive assignments outside class. This module covers the difference between regression, classification, and clustering, as well as feature engineering and feature extraction, overfitting and underfitting, and a variety of machine learning models commonly used for regression. It also includes a detailed example of applying regression models for electricity load forecasting using real\-world data. | ||
|
||
|
||
The instructions inside the live scripts will guide you through the exercises and activities. Get started with each live script by running it one section at a time. To stop running the script or a section midway (for example, when an animation is in progress), use the <img src="Images/image_0.png" width="19" alt="image_0.png"> Stop button in the **RUN** section of the **Live Editor** tab in the MATLAB Toolstrip. | ||
|
||
## Contact Us | ||
|
||
Solutions are available upon instructor request. Contact the [MathWorks teaching resources team](mailto:[email protected]) if you would like to request solutions, provide feedback, or if you have a question. | ||
|
||
|
||
## Prerequisites | ||
|
||
This module does not assume any prior exposure to the subject of machine learning. | ||
|
||
|
||
## Getting Started | ||
### Accessing the Module | ||
### **On MATLAB Online:** | ||
|
||
Use the [<img src="Images/image_1.png" width="136" alt="image_1.png">](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Machine-Learning-for-Regression&project=MLforRegression.prj) 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. | ||
|
||
### **On Desktop:** | ||
|
||
Download or clone this repository. Open MATLAB, navigate to the folder containing these scripts and double\-click on [MLforRegression.prj](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 <img src="Images/image_2.png" width="16" alt="image_2.png"> **Add-Ons** > **Get Add-Ons**. | ||
|
||
|
||
## Products | ||
|
||
MATLAB® is used throughout. Tools from Statistics and Machine Learning Toolbox™, Deep Learning Toolbox™, and Econometrics Toolbox™ are used frequently as well. Parallel Computing Toolbox™ is utilized specifically for the [parfor](https://www.mathworks.com/help/parallel-computing/parfor.html) function. | ||
|
||
|
||
# Scripts | ||
|
||
*If you are viewing this in a version of MATLAB prior to R2023b, you can view the learning outcomes for each script* [*here*](https://www.mathworks.com/matlabcentral/fileexchange/95903-machine-learning-for-regression) | ||
|
||
## [**MachineLearningIntro.mlx**](Scripts/MachineLearningIntro.mlx) | ||
| | | | ||
| :-- | :-- | | ||
| <img src="Images/image_3.png" width="171" alt="image_3.png"> <br> | **In this script, students will...** <br> $\bullet$ Learn the difference between regression, classification, and clustering <br> $\bullet$ Define feature engineering/extraction <br> $\bullet$ Identify and use different machine learning models commonly used for regression <br> $\bullet$ Be able to explain overfitting and underfitting <br> | | ||
| | | | ||
|
||
## [**LoadForecastRegression.mlx**](Scripts/LoadForecastRegression.mlx) | ||
| | | | ||
| :-- | :-- | | ||
| <img src="Images/image_4.png" width="171" alt="image_4.png"> <br> | **In this script, students will...** <br> $\bullet$ Apply the machine learning workflow to solve a problem in time series forecasting <br> $\bullet$ Engineer appropriate features to solve the forecasting problem <br> $\bullet$ Validate and compare different types of regression models <br> $\bullet$ Test and evaluate the trained model to make predictions <br> | | ||
| | | | ||
|
||
## [**FE1\_ProgrammaticML.mlx**](Scripts/FE1_ProgrammaticML.mlx) **and** [**FE2\_LoadForecastDL.mlx**](Scripts/FE2_LoadForecastDL.mlx) | ||
| | | | ||
| :-- | :-- | | ||
| <img src="Images/image_5.png" width="371" alt="image_5.png"> <br> | **In these scripts, students will...** <br> $\bullet$ Expand on the practical problem presented in [LoadForecastRegression.mlx](Scripts/LoadForecastRegression.mlx) <br> $\bullet$ Define feature engineering/extraction <br> $\bullet$ Identify and use different machine learning models commonly used for regression <br> $\bullet$ Be able to explain overfitting and underfitting <br> | | ||
| | | | ||
|
||
# Related Courseware Modules | ||
## [**Regression Basics**](https://www.mathworks.com/matlabcentral/fileexchange/93435-regression-basics) | ||
| | | | ||
| :-- | :-- | | ||
| <img src="Images/image_6.png" width="171" alt="image_6.png"> <br> | **Available on:** <br> [<img src="Images/image_7.png" width="129" alt="image_7.png">](https://www.mathworks.com/matlabcentral/fileexchange/93435-regression-basics) <br> [<img src="Images/image_8.png" width="130" alt="image_8.png">](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Regression-Basics&project=RegressionBasics.prj) <br> [GitHub](https://github.com/MathWorks-Teaching-Resources/Regression-Basics) <br> | | ||
| | | | ||
|
||
## [**Machine Learning Methods: Clustering**](https://www.mathworks.com/matlabcentral/fileexchange/135381-machine-learning-methods-clustering) | ||
| | | | ||
| :-- | :-- | | ||
| <img src="Images/image_9.png" width="171" alt="image_9.png"> <br> | **Available on:** <br> [<img src="Images/image_10.png" width="129" alt="image_10.png">](https://www.mathworks.com/matlabcentral/fileexchange/135381-machine-learning-methods-clustering) <br> [<img src="Images/image_11.png" width="130" alt="image_11.png">](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Machine-Learning-Methods-Clustering&project=MLMethodsClustering.prj) <br> [GitHub](https://github.com/MathWorks-Teaching-Resources/Machine-Learning-Methods-Clustering) <br> | | ||
| | | | ||
|
||
|
||
Or feel free to explore our other [modular courseware content](https://www.mathworks.com/matlabcentral/fileexchange/?q=tag%3A%22courseware+module%22&sort=downloads_desc_30d). | ||
|
||
# Educator Resources | ||
- [Educator Page](https://www.mathworks.com/academia/educators.html) | ||
|
||
# Contribute | ||
|
||
Looking for more? Find an issue? Have a suggestion? Please contact the [MathWorks teaching resources team](mailto:%[email protected]). If you want to contribute directly to this project, you can find information about how to do so in the [CONTRIBUTING.md](https://github.com/MathWorks-Teaching-Resources/Machine-Learning-for-Regression/blob/release/CONTRIBUTING.md) page on GitHub. | ||
|
||
|
||
*©* Copyright 2023 The MathWorks™, Inc | ||
|
||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.