Normalization and Linear Regression of Data

版本 1.0.1 (1.9 KB) 作者: Alexander Babin
A simple piece of code including a function for linear regression lin_fit(...) for data points X and y
29.0 次下载
更新时间 2020/12/21

查看许可证

the function calculates theta(1) and theta(2) for input data X and output data y to fit a linear function h = theta(1)*X(1) + theta(2) with minimum MSE of h - y through the given data points. Elements of theta are
determined using the gradient descent method, computed iteratively until the convergence criterion is met that is when absolute relative increment of the cost function J is less or equal to the value of tolerance tol,
where J = 1/m sum((h - y).^2);

引用格式

Alexander Babin (2025). Normalization and Linear Regression of Data (https://www.mathworks.com/matlabcentral/fileexchange/84520-normalization-and-linear-regression-of-data), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2019b
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.1

- normalization removed as it resulted in data change

1.0.0