These days everyone is speaking about computers, about their super powers and the "fanciest" word around is machine learning. But did the people actually understand how the machine learning works?

In this post I'll share with you what I've learned about it in the last couple of months. Before we've started you should know the answer of the question...

What is learning?

Simply learning is the process in which our brain is evolving and upgrading its knowledge base. That knowledge can be achieved by reading, by speaking with smarter people like science teachers & business owners, or simply by a lot of try{} catch ($e){} cases /*for the none developers that means to make a lot of attempts which would be a failure and to learn from your mistakes*/. Oookay...

But how could you teach the computer when it doesn't have brain?

Actually the computers do have a brain. That's the CPU chip!

Their brain is a lot more simpler than ours but it still can be taught from a good teacher. Teacher who is going to tell it what is good and what is wrong. What should be done in the specific cases of the different types of work.

How can you do that?

Very simple... With computer programs, which you've written by the years or with one single algorithm. Since we already know that the computer programs can do a lot of things here I'll speak more about that algorithm thing.

What is it?

The algorithm is actually a computer program, which has something in its core which allows it to learn from you and predict what should be the end result, based on your actions.

There are two types of algorithms: Supervised and Unsupervised

Here I'll share with you the secrets of...

The Supervised machine learning

Supervised Machine Learning Basic Structural Graph by Gero Nikolov

Imagine that you have a little child, which you had to learn on the basics of life. For the kid you will be a teacher, a supervisor, the person who will navigate it trough the good and trough the hard times. The kid is the algorithm and the way in which it will grow up is the result. Sounds simple, right?

Let me give you an example:

If you want the kid to become a doctor you are going to tell it that doctors save lives, which helps the society with reducing the different kinds of diseases. But you won't stop with that. You'll tell it that there are also bad people, which are making bad things, such as robb*ries and m*rdering...

Only when the kid knows what are the difference between good & bad it will be able to make the correct choice. The choice to become a doctor! Then the result is the expected one and your supervising against the algorithm was correct.

The exactly same example is valid for the computer algorithm too!

Hmm... Are you sure?

Of course I am! When you are going to build you algorithm to do some job based on the user interaction, you are going to tell it which activities are good (drives to a positive result) and which are bad (hits an error). So when the supervisor (user) starts to use it, the algorithm will make correct predictions for him/her.

You still don't believe me? Let me give you an example with the latest project of Dloober. which is based exactly on this algorithm...

Few words about the project

It is a WordPress plugin called AINOW. Its core idea is to track your users interactions with your blog posts, which are listed on a specific page. Based on those interactions the algorithm gets to know each of your readers and next time when they come back, they will see only those articles which are based on their interests!

How this helps you?

First it will remove the annoying administrative work from your shoulders. Second and mainly, it will leave you just to create those amazing stories, which you love to!

How it works?

Machine Learning Example Algorithm Graph by Gero Nikolov

It is very simple actually... You are the godfather of the whole track. You are the person who creates the stories which the reader will see. After that the reader becomes the supervisor who will tell the algorithm what he expects to see next time.

Okay... But how the computer will remember the information?!

There are two ways to do that. First you can keep the information into files on the hard drive of the user (if your app is desktop or mobile). On the second hand you can save the data in a remote database server (if your app is based on the web).

Both ways have their specifications and there isn't a wrong way to do that! If you choose to keep the files locally, they will be available even the user is not connected to the internet. But the access to different information can be slower than the database server solution, because files are NOT optimized for complex queries!


That is pretty much the whole thing behind the supervised machine learning. If you have any question I would like to collaborate with you in the comments or on a cup of coffee in Starbucks sometimes.

Ooh one more thing... Keep the positive vibe!

PS. The original post can be found in my LinkedIn profile here.