Skip to content

q145492675/GD-GradientDescent_of-LinearRegression-Classification-Matlab

Repository files navigation

GradientDescent_of-Linear-Regression-Classification-Matlab-

This routine is implemented in Matlab

Requirements:

Matlab2012b and its latest version

Description:

This routine using GradientDescent to do the Linear Regression and Classification. I set two questions as an example:

  • We think the height of human has a close relationship with the weight of human, Now we get 15 american women's (Age:30-39)heights and weights, We assume the predict function is y=b1+a1x+a2x^2 (x is height and y is weight). So we can get the optimum predict function between than.

  • Based on the length & width of the sepal and length and width of the petal, predict what kind of Iris it is (Two kinds: setosa & versicolor ), the dataset is come from UCI Machine Learning Repository URL:http://archive.ics.uci.edu/ml/datasets/Iris

  • The Screenshot of the result:

Usage:

  • Download the whole runtine.
  • Run :
    Master.m make sure all m-files are in the same folder.

Appendix

About

This routine is implemented in Matlab

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published