Introduction¶
What is AI, ML, NN?¶
"The coming era of Artificial Intelligence will not be the era of war, but the era of deep compassion, non-violence, and love" Amit Ray, Pioneer of Compassionate AI Movement
The field of artificial intelligence, or AI is concerned with not just understanding but also building intelligent entities - machines that can compute how to act effectively and safely in a wide variety of novel situations. - AI definition from "Artificial Intelligence: A Modern Approach 4"
Machine learning (ML) is the science (and art) of programming computers so they can learn from data. - ML definition by Aurelien Geron.
Neural Networks (NN) reflect the behaviour of the human brain, allowing computer programs to recognize patterns and solve common problems in the fields of AI, machine learning and deep learning. - NN definition by IBM.
Problem domains¶
The most popular problems/domains which NN algorithm solves are considered to be:
- Regression -
the relationship estimate between dependent and independent variables.
For example, you have different statistics about the house (f.i. bedroom number, has it garage or not, etc.) and you are required to estimate its price. More information
- Computer Vision -
derive meaniningful information from digital images, videos and other visual inputs.
TLDR: allows computers to see, observe and understand. For example, is it the image of dog or not? More information
- Natural Language Processing (NLP) -
understand text and spoken words in much the same way human beings can.
For example, is this email spam or not? More information
- Time Series -
sequence of data that occur in successive order over some period of time.
TLDR: tracks a sample over time. More information
Languages and packages¶
One of the most popular languages used for NN is Python, so in this workshop/tutorial we will be using it with libraries/packages associated with it.
Libraries/packages:
- TensorFlow - an end-to-end machine learning platform. Documentation here
- NumPy - the fundamental package for scientific computing with Python. Documentation here
- Pandas - open source data analysis and manipulation tool. Documentation here
- Scikit-learn - simple and efficient tools for predictive data analysis. Documentation here
- Matplotlib - library for creating static, animated, and interactive visualizations. Documentation here
How to set up all packages can be found on according websites.
Training ML models requires much computing power and often your computer don't have so much power to execute code. In that situation I recommend using free cloud-based Python code executors.
Building models with TensorFlow¶
Building models in TensorFlow consists of 3 stages:
- creating a model (with Sequential API or Functional API).
- compiling a model -
model.compile()
During compiling such parameters as loss functions, optimizer and metrics should be defined. More information about them here.
- fitting a model (training) -
model.fit()
Important thing in Machine Learning is evaluating models. With model.evaluate()
you can test your model against data it didn't see so model overall accuracy can be estimated.