Page 127 - Ai_C10_Flipbook
P. 127
The algorithm is able to determine to which set a given data point belongs to, by means of a classification function
represented by the dotted line. The model classifies datasets according to the rules given to it.
onion
ginger
For example, if we want to train a model to identify if an image is of an onion or a ginger, we need to train it with
multiple images of both onion and ginger along with their labels. The machine will then classify images on the
basis of the labels and predict the correct label for testing data. Classification works on discrete dataset. Following
are some examples of classification:
• Image Classification: In this scenario the model would be trained on different categories of images. The model
would learn the pattern as fed by the training test and would be able to categorise images into predefined
categories based on the pixel values of the images. For example, when differenet image of raw, ripe and rotten
bananas are fed into the model, the trained classification model would analyse the images and predict the most
likely category raw banana, ripe banana or rotten banana.
• Email Spam Detection: In this scenario, the model is trained with the words in the email, information of the
sender, precedence of links to classify the emails under “Spam” or “Not Spam”. The trained model would then
analyse the emails and predict them as “Spam” or “Not Spam”. Similar models are being used to categorise calls
and messages as “Spam”.
Inbox
Spam
Not Spam
Classification
Model
Spam
spam
Spam
Not Spam
Input Output
• Weather Classification: In this scenario, the model is trained with features like temperatures, humidity, wind
speed and pressure to predict the type of weather. The trained model is now capable of predicting the weather
based on the atmospheric conditions under the category of “Sunny”, “Rainy”, ”Cloudy”.
Regression
Regression algorithms predict a continuous value based on the input variables. It is an example of a rule-based AI
model. In regression, the algorithm generates a mapping function from the data, as shown by the solid line in the
given graph. The green dots shown in the graph are the data values and the solid line here represents the mapping
done for them. With the help of this mapping function, we can predict the future data. For example, if we want to
predict the temperature of a day in a year, we can use past year’s temperature for that day as training data and
can predict it for the coming year.
Advanced Concepts of Modeling in AI 125

