Artificial Intelligence Course Notes
Artificial Intelligence Course Notes
Artificial Intelligence Course Notes
In contrast of Expert Systems, machine learning doesn’t need to program what step it should take, it
looks at the data and take steps according its own set of steps and mathematical formula based on the
data that it seen then automatically generate, create and construct what step to take. For example we
take an image of the cat to the expert system, and we say that identify it as a cat. So, we have to identify
and classify each part of the cat that machine looks these patterns and identify the cat. So if one of these
identified pattern are not true so it’s not a cat. It is the Expert Systems way but what is the machine
learning way to identify the objects? We take different images of different breeds and in the same time
we take images of dogs, human being etc. the machine see the images and its labels that you take the
machine checks all the boxes and patterns and automatically classify it as a cat, dog or human. But if we
not identified one of the patterns to the expert system it can be fail. In contrast the accuracy of the
machine learning is much better than the expert system. Because we have a subfield of AI called
Computer Vision which mostly deal with visual data. And we have another subfield of AI called Natural
Language Processing (NLP) that mostly deal with language data (text and audio).
Artificial Intelligence
Neural networks is the subcategory of machine learning that it’s a collection of related neuron inspired
from human brain which get input and produce output. If a neural network is be much enough complex
and has a lot of layers of data it call deep learning, which most of the success story we hear in the news,
social media… are actually deep learning methods applied.
Artificial Intelligence
1. Supervise learning: is the most common way to train a machine learning model. For instance if we
want to make a machine to distinguish spam from important emails we can use a supervised
learning approach. For supervise learning we should have input + label. So we have to tag the
emails that its spam or important and if we give it enough data it will find the pattern that its spam
or important email.
2. Unsupervised learning: in this approach we don’t have a specific label for data we just have raw
input data and we want to do some analysis on it and want to find some pattern on the data or
maybe want to classify the data based on the distribution or distance of the each data point. For
example we have thousands of email none of them have label we use unsupervised learning to find
email text that are similar to each other and clustered it to spam or important emails. And it’s good
for exploratory data analysis.
3. Reinforcement learning: it’s based on the state of the environment and it also have an agent which
is one of the AI model and this agent trying to interact with the environment in an efficient and
intelligent way (rational way to do the task) and when we train it many times it will eventually learn
how to perform better based on reward of what to do and what to avoid. Like the robot to navigate
the environment. Other example is autonomous driving car and train it how to drive in an actual
road without hitting the other cars or without going to sidewalk or hit the pedestrians.
4. Semi-supervise learning: it’s the combination of supervised and unsupervised learning. Why it’s
interesting; we have much more unlabeled data than labeled data. Imagine we are working with
documents like google that its databases have billions of books, let see our task is to OCR (recognize
a character from scanned books and turn them into searchable text. So gathering data for this type
of task is a tedious work and time consuming. So what can do is use semi-supervised learning;
according to definition it takes some labeled data and a lot of unlabeled data and trying to
understanding how the distribution of unlabeled data is, using the labeled data and perform the
specific task that we want with a high accuracy.
Neural Networks
Neural networks is the subset of machine learning model which its most famous model is the deep
learning model that is very helpful for finding non-linear patterns. We take some input data (input layer)
like an image and we turn it into the numeric format means we change the pixels to floating point
numbers that machine can understand. And the numbers go through the neural network/hidden layer
which perform some hidden process on data that are mathematical operations and eventually the
output produced. Than we take the output which called predicted data and compare it with actual
image, for the comparison a loss function used that show how close the output data with the actual data
is. If the model predicted output be too close to the actual data so it is loss will be low. And then we use
a mathematical operation which is called gradient decent to reduce the loss and we use some back
propagation (like reverse engineering) to find the loss and by this way we train the model.
Basically the Neural Network inspired from the structure of the Biological Neurons, which are found in
the brain and nervous system of the human body.
Artificial Intelligence
A Deep Neural Network is a neural network which has multiple hidden layers between the input and
output layers. If we provided enough data to train from, deep neural networks can significantly
outperform other machine learning algorithms on the accuracy of their prediction, due to their felicity in
learning complex mathematical mappings from input to output.
One of the most significant limitation that Neural Network have, is that Neural Networks are really data
hungry, it means if we have ten examples we are probably not able to train the Neural Network from
scratch because most of NN algorithms train on huge amount of data. For example we need million
images to classify one category of object. If we have a lot of data and the mathematical operation that
performing data that are really complex, then we will need a lot of computation power and then it will
take a long amount of time to a model to be train.
As a rule if a Neural Network have at least two layers it consider as Deep Neural Network (deep
learning).
Is a field of study that involves the automation of the processes of reading, interpreting and analyzing
natural language by machine, It include the application of techniques such as Computational Linguistics
and more recently Machine Learning to build real-world application that work with natural language.
The goal of NLP is to make machine almost as good at human language as human are, but language is a
really complex phenomena.
Some of the use cases of NLP are Google’s products, so when you type and trying to search for
something it helps you with autocomplete feature and also suggest different keywords. Another
example of NLP use cases is Spell checking and grammar checking software such as Grammarly, news
feeds such as Facebook and Twitter, Chatbots and Voice Assistants such as Apple Siri and translation
systems such as Google Translate are other example of products where NLP is leveraged to enhance
user experience.
We can also do Sentiment Analysis with text, if your product in the market receives reviews you can
train the NLP to analysis the reviews and tell you what the sentimental is, is the comment or review is
positive or negative, by using these data you can make better decisions.
Computer Vision
Computer vision is another subfield of AI that deal with images and videos or other types of visual inputs
like CTSCAN that diagnostic cancers or other chronic maladies these result have significant replication
for the industry and for practicing machine learning and a big opportunity to human being to take
advantages of machine learning.
Artificial Intelligence
Computer Vision allows a machine to gain a high-level understanding of visual inputs and take actions
based on the inference gained from these inputs. The process behind Computer Vision typically involves
image acquisition, image screening, image analysis and identifying and extracting information from
image.
Computer vision tasks are relatively classified to six subdomain, the most basic tasks that computer
vision is really good at is:
Image classification: labeling an image based on the object in the image, just you give it image and it
will tell you what category it is (like the cat example that we mentioned previews).
Object Detection & Localization: detecting the object and localizing it using a bounding box.
Segmentation: clustering together parts of the image that belong to the same object class.
Image Captioning: describing the image using natural language (combining NLP with Computer Vision)
Generative Modeling: generating images based on the style of another image, the idea is if you train a
model using set of images, it can generate images that are not in the training data (mean generate new
faces) and we have several websites to generate new faces like this person does not exist.
Video Analysis: processing the entire set of image frames for object detection and tracking.
Convolution Neural Networks (CNN) are deep learning models specifically optimized for image data in
Computer Vision tasks.
How Computer Vision works? It use a specific type of Neural Network which is called Convolution Neural
Network, so actually this task is an image classification task. It goes through the series of convolution
layers and followed by non-linearity to create the fundamental neural network and finally make
prediction what class this input image could be.
Facial Recognition is a method of identifying or verifying of an individual using the image of their face.
There are various steps involved in the process, and the accuracy of the model can vary depending on
the training regimen and algorithm quality among other factors.
Use for security tasks automatically for example there is a CCTV camera in the factory you are working
for and the camera look at your face and identify you as an employ and you can gain access to the
factory.
Video and Traffic Analytics Computer Vision and AI algorithms are also being applied to automate video
surveillance tasks for vehicle traffic in urban areas, as the high density would make manual surveillance
(watch) is highly labor intensive. This can be used to detect or provide alerts for any sort of anomaly
(nahanjary), such as over-speeding, lane indiscipline, absence of number plates/ electronic tags and road
accident.
Artificial Intelligence