Artificial Intelligence: The second sixth day - Part 3

Machine Learning





If you've read our last couple of blog-post's you've gotten a sense of how AI developed and the milestones it has reached over the years. AI is officially a mainstream technology, not just a science for geeks at prestigious universities.

No one sub-field of AI has permeated everyday digital life like Machine Learning. From Social media to medical research, finance to sociology and even predicting crime. Machine Learning is now a corner stone technology in our digital lives and even influencing our real - everyday lives.

Here's how it works - some really smart geeks design and build an application or 'agent' that learns to perform a specific task. Note it is not programmed to perform a particular task, rather it must learn to perform the task. It starts off performing very poorly at this task but adjusts its performance with each attempt, getting better and better at performing that task.


It sounds simple right? Its a bit more complicated, a few pieces have to come come together to make Machine Learning work.

So lets say we want to build an agent that given a photograph can identify the human faces in the photograph and what race they are (tricky task at the best of times right?).

The agent must be able to distinguish faces from other objects that may appear in a given photograph and then using skin colour, eye colour, hair texture, eye shape, shape of the nose etc to make a decision as to the race of the individual - Black African, Mongoloid (East Asian), Native American, Caucasian, South Asian - and the different mixes of these.

First we need to collect some raw data that will be used to train and evaluate the performance of our Machine Learning agent. The more data we have, the better. As it will allow the agent more opportunities to improve its performance. We'll also have more opportunities to test its accuracy. Our data needs to be as representative as possible of the real world - i.e. it must be random, not biased abnormally to any particular race etc.


We then split the data into two parts, to use for training the agent and then assessing its ability to make accurate determinations of race.


To make 'guesses' of the race's of the humans in a picture, our agent would need to use a mathematical model (complicated equation) that takes the various human features (skin colour, hair texture, eye colour etc) as variables. Our mathematical model will also include some random values (constants) that we can tweak to improve the accuracy of its guesses.

A sample mathematical model

Next comes training day! We take the raw data photo's we collected earlier. Feed them to our agent who runs the features detected through the mathematical model and makes a guess of each persons race. These guesses are compared to the correct answer. The model is tweaked slightly to improve accuracy. This completes one training step.


Needless to say, in the beginning the guesses are way off. With each training step however they get better as we work our way through our training data set. Once we've exhausted our training data our model should be fairly good at telling a person's race.
training day

It is worth noting that the quality of the agents guesses and real world performance is directly dependent on quality and quantity of our training data.


 Once satisfied that our agent is fighting fit and ready for action we must test it with the raw data we had set aside for evaluation. This data must not have been used in training at all (otherwise our agent would have simply learned to memorize the expected output).

The agent is evaluated and if it does no display the level of accuracy we decide is required - then we'll need to gather more training data and train our model some more. Until the accuracy required is met.


Our agent is now ready to be set free into the work force to do what it does best - guess peoples races. Its worth noting that most Machine Learning agents need continual retraining (or in some cases train themselves as they work) to keep themselves abreast with a dynamic work environment.


This is of course a very high level, hyper-simplified explanation of how Machine Learning works, but it gives you an idea of what goes on under the hood. So next time you're chatting to Alexa, Google Assistant or Siri, or the next time Facebook suggest to you who the person in a photo you just uploaded is, or the next time Facebook translates a foreign language post- you'll know whats going on 😃.

What other applications of Machine Learning do you know of? Drop a comment and let us know.








Comments

Post a Comment

Popular posts from this blog

Artificial Intelligence: The second sixth day - Part 1

Digital Money: Bit Coin, Cryptocurrencies and the Block Chain - Part 2