DEV Community

Alessandro T.
Alessandro T.

Posted on • Originally published at trinca.tornidor.com

How to learn machine learning

Some notes about machine learning

It's a way in which a machine is able to perform tasks without explicit programming. Theoretical bases have existed since the 1960s, but significant results are possible thanks to dedicated hardware, algorithms capable of exploiting this power and well structured datasets.

A classification example

A software programmed explicitly to perform image classification would need to identify explicitly the characteristics of the object. This can work if all objects are reasonably simple and similar. But what if the some features of the same object category have an high variance?

An approach without explicit instructions

We could submit a suitably labeled dataset of image data to the software (i.e. the machine learning model) by performing an appropriate number of training-and-testing cycles on it. Another example could use linear regression to predict prices of houses by their sizes. The common ground here is study the data to form an hypothesis. Adding more data probably will expose errors within the hypothesis, then we can measure the error gap and form an updated hypothesis with a minor error gap.

The machine has to analyze the dataset using some assumptions, e.g. a linear variable that can be represented as a straight line on a Cartesian plane. The machine goal is to test every possibile result to extract the one with the lowest error rate. It's simple with a linear variable, much more complex with some modern machine learning models that have billions of variables, but the principle is the same: the machine start from a random point (or parameters set) and move towards the lowest error rate, cycle after cycle of train and test.

Every train-and-test step give a measure (an "error function" or "loss function") and the repetition of these steps is the "gradient descent" towards the solution.

There are various ways to improve results such as backpropagation to fine-tune the data parameters and neural node dropouts to reduce overfitting (when the ML model is no longer can generalize well on real world data).

Some machine learning categories

Sources to learn more

Top comments (0)