Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mathworks-teaching-resources/regression-basics

Interactive courseware module that addresses the fundamentals of regression analysis taught in STEM courses.
https://github.com/mathworks-teaching-resources/regression-basics

courseware cwm matlab matlab-live-script regression

Last synced: about 2 months ago
JSON representation

Interactive courseware module that addresses the fundamentals of regression analysis taught in STEM courses.

Awesome Lists containing this project

README

        

# Regression Basics

[![View on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/93435-regression-basics) 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/Regression-Basics&project=RegressionBasics.prj&file=README.mlx)

[![MATLAB Versions Tested](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FMathWorks-Teaching-Resources%2FRegression-Basics%2Frelease%2FImages%2FTestedWith.json)](https://MathWorks-Teaching-Resources.github.io/Regression-Basics)

**Curriculum Module**

_Created with R2024b. Compatible with R2024b and later releases._

# Information

This curriculum module contains an interactive [MATLAB® live script](https://www.mathworks.com/products/matlab/live-editor.html) that illustrates some basic concepts of regression analysis.

## Background

You can use this live script as a demonstration in lectures, a class activity, or an interactive assignment outside class. This module covers topics including solving for linear regression parameters, assessing and improving performance of regression models, and applying the gradient descent algorithm. It also includes an example of using a linear regression model to perform short\-term forecasting.

The instructions inside the live script will guide you through the exercises and activities. Get started with the 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 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 assumes knowledge of plotting and working with linear data.

## Getting Started
### Accessing the Module
### **On MATLAB Online:**

Use the [image_1.png](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Regression-Basics&project=RegressionBasics.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 [RegressionBasics.prj](RegressionBasics.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 image_2.png **Add-Ons** > **Get Add-Ons**.

## Products

MATLAB® is used throughout. Tools from Statistics and Machine Learning Toolbox™ are used frequently as well. Parallel Computing Toolbox™ is used specifically for the [parpool](https://www.mathworks.com/help/parallel-computing/parpool.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/93435-regression-basics)

## [**RegressionBasics.mlx**](Scripts/RegressionBasics.mlx)
| | |
| :-- | :-- |
| image_3.png
| **In this script, students will...**
$\bullet$ Use least squares to solve for linear regression paramaters
$\bullet$ Use a goodness\-of\-fit measure to assess model performance
$\bullet$ Apply a basic linear regression to model real\-world electricity load data
|
| | |

# Related Courseware Modules
## [**Machine Learning for Regression**](https://www.mathworks.com/matlabcentral/fileexchange/95903-machine-learning-for-regression)
| | |
| :-- | :-- |
| image_4.png
| **Available on:**
[image_5.png](https://www.mathworks.com/matlabcentral/fileexchange/95903-machine-learning-for-regression)
[image_6.png](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Machine-Learning-for-Regression&project=MLforRegression.prj)
[GitHub](https://github.com/MathWorks-Teaching-Resources/Machine-Learning-for-Regression)
|
| | |

## [**Machine Learning Methods: Clustering**](https://www.mathworks.com/matlabcentral/fileexchange/135381-machine-learning-methods-clustering)
| | |
| :-- | :-- |
| image_7.png
| **Available on:**
[image_8.png](https://www.mathworks.com/matlabcentral/fileexchange/135381-machine-learning-methods-clustering)
[image_9.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)

# 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/Regression-Basics/blob/release/CONTRIBUTING.md) page on GitHub.

*©* Copyright 2023 The MathWorks™, Inc