MatLab / Octave machine learning: examples of algorithms supported by formulas
I recently started learning machine learning. I started with a beautiful, in my opinion, course from Andrew Ng. And in order not to forget, as well as to repeat what I learned, I decided to create a repository of Machine Learning in Octave . In it I collected mathematical formulas for hypotheses, gradient descents, "cost function", sigmoids and other fundamental "machine" for machine learning. Also added there are simplified and refined examples of the implementation of some popular algorithms (neural network, linear / logistic regression, etc.) for MatLab / Octave. I hope this information will be useful for those of you who are planning to start learning machine learning.
The topic of machine learning is quite extensive, as can be judged, for example, from the following diagram, which I took (translated) from the magnificent vas3k article .
At the moment of all this diversity in the repository there are examples of five supervised and unsupervised algorithms:
- Linear regression with an example of house value forecasting.
- Logistic regression with examples of the definition of faulty chips, as well as the recognition of handwritten numbers using the "one against all" principle.
- The K-means algorithm with an example of data distribution into three clusters.
- Search for anomalies using Gaussian distribution with an example of determining an overloaded server.
- Neural network based on multi-layer "perceptron" with an example of handwritten digit recognition.
For each algorithm there is a file demo.m
from which you can start the analysis of a single algorithm. When you run this file from the Octave console (or from MatLab), the service information will be displayed illustrating the operation of the algorithm, as well as graphs will be built to help you work out with which training set.
I hope this repository will be useful for you and will help to take another step towards machine learning.
PS Examples in the repository are created for MatLab / Octave . This may not be such a popular option now as Python, but still it might be a good idea for learning, fast prototyping, and the same matrix multiplication without additional plug-ins and libraries. Once again, successful coding you!