Machine Learning for dummies
Marcos Pimienta
Software Engineer | DevOps | Full Stack Software Developer #JavaScript #React #Vue #Python #Cloud #Web3
Hello it is a great honor for me to have you as a reader, one thing I can promise is that I will do my absolute best to explain in a very joyful and entertaining manner a very technical concept as machine learning, so without more delays, allow me to start.
What is machine learning?
"Machine learning is a subfield of artificial intelligence (AI). The goal of machine learning generally is to understand the structure of data and fit that data into models that can be understood and utilized by people." Lisa Tagliaferri
Normally in almost every field of computer science, algorithms are a fixed set of instructions to calculate or solve a problem, while in machine learning the computer will train itself to solve a problem using large amount of relevant data as inputs, with statistical analysis it will generate an output, or answer.
Narrow vs General
AI could be divided in two categories, general and narrow.
General AI:
This will try to simulate all of the characteristics of human intelligence, including things like planning, understanding language, recognizing objects and sounds, learning, and problem-solving.
Narrow AI:
It is like a more focused task, it will perform extremely well with this single task, but is lacking in other areas or tasks. A machine that is great at image recognition, but nothing else, would be a clear example of how narrow AI works.
Machine Learning Methods
Supervised Learning:
For the machine to learn in a supervised manner, the machine is provided with a desired output or answer to a problem, the machine will try different manners or solutions until it reaches the desired answer or output.
Unsupervised Learning:
When the machine is learning in an unsupervised manner, it does not have a specific desired output, instead it has a set of data which will try to find patterns or commonalities, for example transactional data, where you have huge amounts of data like purchases made by women in a store, it will be very hard for you to analyze in which items are women specifically interested in, so you can assign a machine to do its thing and gives you a pattern as an answer.
APPROACHES
"As a field, machine learning is closely related to computational statistics, so having a background knowledge in statistics is useful for understanding and leveraging machine learning algorithms" Lisa Tagliaferri.
- Correlations:
Represents the relationship between two variables(x and y) that are either dependent or independent from each other.
- Regressions:
Is used to study the relationship between one dependent(x) and one independent(y) variable. These are used to anticipate an outcome when the independent variable(y) is known, regression enables predictions.
Decision Tree Learning:
"In decision analysis, a decision tree can be used to visually and explicitly represent decisions and decision making. As the name goes, it uses a tree-like model of decisions. Though a commonly used tool in data mining for deriving a strategy to reach a particular goal, it is also widely used in machine learning." Prashant Gupta.
How is this related to a tree? just look at the shape of a tree, with a trunk that has multiple branches and roots beneath the dark earth, each part of where the tree splits into branches could be represented as multiples decisions to be taken, so normally the machine will try to look for the most optimal path, using complex prediction algorithms, or with supervised learning.
DEEP LEARNING
"Deep Learning is just a type of Machine Learning, inspired by the structure of a human brain. Deep learning algorithms attempt to draw similar conclusions as humans would by continually analyzing data with a given logical structure. To achieve this, deep learning uses a multi-layered structure of algorithms called neural networks." Artem Oppermann.
The most important concept in deep learning is the neural network, this will simulate how the human brain works when it uses pattern recognition, classify large amount of data sets, when your brain receives new information it will try to compare it with previous data stored, same happens with a neural network, once a data set is sent to the network, it will compare it with previous stored data.
The “neurons” have discrete layers and connections to other “neurons”. Each layer has a specific feature to learn, such as curves or edges in the case of image recognition. Those layers are the responsibles that give deep learning its name, by using multiple layers as opposed to a single layer depth is created.
DEEP LEARNING vs MACHINE LEARNING
Before neural networks were part of machine learning, we had flat algorithms. which means that algorithms can not be applied directly to the raw data ( images, text, etc.). We needed a preprocessing step called Feature Extraction.
Feature Extraction
This is usually quite a complex and boring task that requires detailed knowledge of the main problem. This preprocessing layer must be adapted, tested and refined over several iterations for the most optimal or best results, while the neural networks of deep learning do not need the feature extraction step.
AI and IoT
"I think of the relationship between AI and IoT much like the relationship between the human brain and body." Calum McClelland
The human body collects information through senses such as image by sight, sound by hearing, and touch by skin etc... Our brains receive data and process it, showing light into recognizable objects and converting sounds into understandable speech. Our brains then start to make decisions, sending signals back out to the body to command movements like picking up an object or speaking etc...
In the Internet of Things all the connected sensors are like the nervous system in our bodies, they provide the raw data of what is going on in the physical world. Artificial intelligence would be like our brain, using that data to make sense and decide what would be the actions to perform. And the connected devices that use IoT(Internet of Things) are again like our bodies, performing physical actions, or communicating to others.
In my humble and always inquiring opinion, I think that with the use of AI will push forward the adoption of the IoT(Internet of Things), establishing a symbiotic relationship in which both areas will increase drastically. Because AI makes IoT useful.
THE MATH BEHIND MACHINE LEARNING
"Machine Learning theory is a field that intersects statistical, probabilistic, computer science and algorithmic aspects arising from learning iteratively from data and finding hidden insights which can be used to build intelligent applications."Wale Akinfaderin
Basically the mathematics will make Machine Learning a powerful tool or a liability, there are four(4) reasons of why it is EXTREMELY important when we talk about ML(Machine Learning):
- Selecting the right algorithm:
- Accuracy
- Training Time
- Model Complexity
- Number of Parameters
- Number of Features
2. Parameter Settings and Validation Strategies
3. Bias-Variance tradeoff identification.
4. Estimating the right confidence interval and uncertainty.
I did not want to go deeper on those concepts so I will not bore the crap out of you, just keep in mind that to make machines learn properly and accurate, you should be conscious about the math that allows your machine to apply those four(4) concepts at least.
Mathematics you should learn for ML(Machine Learning)
- Linear Algebra: Because it is everywhere in machine learning, it is the logic or thought process of that machine that is learning.
- Probability Theory and Statistics: Like some people say "machine learning is like doing statistics on a MAC", this goes hand to hand with linear algebra.
- Multivariate Calculus: Differential and Integral Calculus, Partial Derivatives, Vector-Values Functions, Directional Gradient, Hessian, Jacobian, Laplacian and Lagragian Distribution.
- Algorithms and Complex Optimizations: Because you need to understand the computational efficiency and scalability of your Machine Learning Algorithm.
When I look into what goes behind machine learning, I see such a long road before me, that I am not sure if I have the patience for learning all that math, do not get me wrong, I love math, but I think that right now in my life I want to get a reward faster, that is why even though this is such an interesting topic, I decided to take another path that is more gratifying for me, but that is my story, hopefully if you have come along this entire article, you got motivated on helping humanity by replacing humans that perform a repetitive and predictable task, we are not machines, we are human beings, we came to this world for another reason more than to survive, and I think that AI will allow us to reach that level where we are not worried about surviving, rather than living with our full potential, or on the contrary, AI could become humanity biggest enemy like in a science fiction movie(Matrix), I am more oriented to a positive outcome, so who knows what the future will bring us, and where technology will lead us...but one thing for sure is that ML(Machine Learning) came to stay with us until the end of our existence.