Model Life Cycle
Model Life Cycle
S. Murugan @ Prakasam
PGT Teacher, Computer Science Dept
Class XI Units
➢ Unit 1: Introduction to AI+
➢ Unit 2: AI Applications & Méthodologies*
➢ Unit 3: Math for AI+
➢ Unit 4: AI Values (Ethical Decision Making)+
➢ Unit 5: Introduction to Storytelling*
➢ Unit 6: Critical & Creative Thinking*
➢ Unit 7: Data Analysis (Computational Thinking)*+
➢ Unit 8: Regression+
➢ Unit 9: Classification & Clustering+
➢ Unit 10: AI Values (Bias Awareness)*+
Class XII Units
➢ Unit 1: Capstone Project
➢ Unit 2: Model Lifecycle (Knowledge)
➢ Unit 3: Storytelling Through Data (Critical and Creative thinking
-Skills)
Model Life Cycle - (AI Project Life Cycle Model)
Introduction
Let us assume that you have to make a greeting card for your
mother as it is her birthday. You are very excited about it and have
thought of many ideas to execute the same. Let us look at some of the
steps which you might take to accomplish this task:
1. Look for some cool greeting card ideas from different sources. You
might go online and checkout some videos or you may ask someone who
has knowledge about it.
2. After finalizing the design, you would make a list of things that are
required to make this card.
3. You will check if you have the material with you or not. If not, you
could go and get all the items required, ready for use.
4. Once you have everything with you, you would start making the card.
5. If you make a mistake in the card somewhere which cannot be
rectified, you will discard it and start remaking it.
6. Once the greeting card is made, you would gift it to your mother.
Are these steps relatable?
____________________________________________________________________
____________________________________________________________________
Do you think your steps might differ? If so, write them down!
____________________________________________________________________
____________________________________________________________________
If we have to develop an AI project, the AI Project Cycle provides us with an
appropriate framework which can lead us towards the goal. The AI Project
Cycle mainly has 5 stages:
Starting with Problem Scoping, you set the goal for your AI project by stating the
problem which you wish to solve with it. Under problem scoping, we look at various parameters
which affect the problem we wish to solve so that the picture becomes clearer
To proceed,
➢ You need to acquire data which will become the base of your project as it will help you in
understanding what the parameters that are related to problem scoping are.
➢ You go for data acquisition by collecting data from various reliable and authentic sources. Since the
data you collect would be in large quantities, you can try to give it a visual image of different types of
representations like graphs, databases, flow charts, maps, etc. This makes it easier for you to interpret
the patterns which your acquired data follows.
➢ After exploring the patterns, you can decide upon the type of model you would build to achieve the
goal. For this, you can research online and select various models which give a suitable output.
➢ You can test the selected models and figure out which is the most efficient one.
➢ The most efficient model is now the base of your AI project and you can develop your algorithm
around it.
➢ Once the modelling is complete, you now need to test your model on some newly fetched data. The
results will help you in evaluating your model and improving it.
➢ Finally, after evaluation, the project cycle is now complete and what you get is your AI project.
Problem Scoping:
➢ Many times, we become so used to a problem that it becomes a part of our life.
➢ Identifying such a problem and having a vision to solve it, is what Problem
Scoping is about.
➢ 17 goals have been announced by the United Nations which are termed as
the Sustainable Development Goals.
➢ A pledge to do so has been taken by all the member nations of the UN.
As you can see, many goals correspond to the problems which we might
observe around us too. One should look for such problems and try to solve them as
this would make many lives better and help our country achieve these goals.
Scoping a problem is not that easy as we need to have a deeper
understanding around it so that the picture becomes clearer while we are
working to solve it. Hence, we use the 4Ws Problem Canvas to help us out.
Who?
The “Who” block helps in analyzing the people getting affected
directly or indirectly due to it. Under this, we find out who the
‘Stakeholders’ to this problem are and what we know about them.
Stakeholders are the people who face this problem and would be
benefitted with the solution.
Here is the Who Canvas:
What?
Under the “What” block, you need to look into what you have on
hand. At this stage, you need to determine the nature of the problem.
What is the problem and how do you know that it is a problem? Under this
block, you also gather evidence to prove that the problem you have selected
actually exists. Newspaper articles, Media, announcements, etc are some
examples.
Here is the What Canvas:
Where?
Now that you know who is associated with the problem and what
the problem actually is; you need to focus on the
context/situation/location of the problem. This block will help you look
into the situation in which the problem arises, the context of it, and the
locations where it is prominent.
Here is the Where Canvas:
Why?
You have finally listed down all the major elements that affect the
problem directly. Now it is convenient to understand who the people that would
be benefitted by the solution are; what is to be solved; and where will the
solution be deployed. These three canvases now become the base of why you
want to solve this problem. Thus, in the “Why” canvas, think about the benefits
which the stakeholders would get from the solution and how it will benefit them as
well as the society.
After filling the 4Ws Problem canvas, you now need to summarize all the
cards into one template. The Problem Statement Template helps us to summarize all
the key points into one single Template so that in future, whenever there is need to
look back at the basis of the problem, we can take a look at the Problem Statement
Template and understand the key elements of it.
Data Acquisition:
➢ Data Acquisition is the process of collecting accurate and reliable
data to work with. Data Can be in the format of text, video, images,
audio and so on and it can be collected from carious source like the
interest, journals, newspapers and so on
➢ The previous salary data here is known as Training Data while the
next salary prediction data set is known as the Testing Data.
➢ Similarly, if the previous salary data was not authentic, that is, it was
not correct, then too the prediction could have gone wrong. Hence….
➢ Such data might not be authentic as its accuracy cannot be proved. Due
to this, it becomes necessary to find a reliable source of data from where some
authentic information can be taken.
➢ At the same time, we should keep in mind that the data which we
collect is open-sourced and not someone’s property.
➢ One of the most reliable and authentic sources of information, are the open-
sourced websites hosted by the government.
➢ Data exploration refers to the initial step in data analysis in which data
analysts use data visualization and statistical techniques to describe dataset
characterizations, such as size, quantity, and accuracy, in order to better
understand the nature of the data
➢ In the previous modules, you have set the goal of your project and have
also found ways to acquire data.
➢ While acquiring data, you must have noticed that the data is a complex
entity – it is full of numbers and if anyone wants to make some sense out of it,
they have to work some patterns out of it.
➢ For example, if you go to the library and pick up a random book, you
first try to go through its content quickly by turning pages and by reading
the description before borrowing it for yourself, because it helps you in
understanding if the book is appropriate to your needs and interests or not.
Thus, to analyze the data, you need to visualize it in some user-friendly format
so that you can:
➢ Quickly get a sense of the trends, relationships and patterns contained within
the data.
➢ Define strategy for which model to use at a later stage.
➢ Communicate the same to others effectively. To visualize data, we can use
various types of visual representations.
Are you aware of visual representations of data? Fill them below:
1. Google Charts
➢ Google chart tools are powerful, simple to use, and free. Try out our rich
gallery of interactive charts and data tools.
2. Tableau
➢ Tableau is often regarded as the grand master of data visualization software
and for good reason.
➢ Tableau has a very large customer base of 57,000+ accounts across many
industries due to its simplicity of use and ability to produce interactive
visualizations far beyond those provided by general BI solutions.
3. Fusion Charts
➢ This is a very widely-used, JavaScript-based charting and visualization
package that has established itself as one of the leaders in the paid-for market.
➢ It can produce 90 different chart types and integrates with a large number of
platforms and frameworks giving a great deal of flexibility.
4. High charts
➢ A simple options-structure allows for deep customization, and styling can
be done via JavaScript or CSS.
➢ High charts is also extendable and pluggable for experts seeking advanced
animations and functionality.
Modelling:
What is AI Training?
Teaching a Machine to properly interpret data and learn from it in order to perform a
task with accuracy. Just like with humans, this takes time and patience.
HYPERPARAMETER:
➢ The system also builds a policy, that what action should be taken under a specific
condition.
➢ Here the machine is building a policy that which drink should be provided under
what condition and how to handle a error in the environment.
Deploy:
➢ Deployment is the method by which you integrate a machine
learning model into an existing production environment to make practical
business decisions based on data.
➢ It is one of the last stages in the machine learning life cycle and can
be one of the most cumbersome.
➢ To deploy a model, you create a model resource in AI Platform
Prediction, create a version of that model, then link the model version to
the model file stored in Cloud Storage.
Retrain:
➢ Rather retraining simply refers to re-running the process that
generated the previously selected model on a new training set of data.
➢ The features, model algorithm, and hyperparameter search space
should all remain the same.
Evaluation
➢ Evaluation is the method of understanding the reliability of an API
Evaluation and is based on the outputs which is received by the feeding the data
into the model and comparing the output with the actual answers.
➢ Once a model has been made and trained, it needs to go through proper testing
so that one can calculate the efficiency and performance of the model.
Testing: It’s techniques include the process of executing a program or
application with the intent of finding failures, and verifying that the model (product) is
fit for use.
Validation : The act of confirming something as true or correct: The new
method is very promising but requires validation through further testing. Validation is
the process of establishing documentary evidence demonstrating that a procedure,
process, or activity carried out in testing and then production maintains the desired level
of compliance at all stages.
➢ Hence, the model is tested with the help of Testing Data (which was separated
out of the acquired dataset at Data Acquisition stage) and the efficiency of the
model is calculated on the basis of the parameters mentioned below:
Model Life Cycle
➢ Once the relevant projects have been selected and properly scoped, the next step of
the machine learning lifecycle is the Design or Build phase, which can take from a
few days to multiple months, depending on the nature of the project.
➢ The Design phase is essentially an iterative process comprising all the steps
relevant to building the AI or machine learning model: data acquisition,
exploration, preparation, cleaning, feature engineering, testing and running a
set of models to try to predict behaviors or discover insights in the data.
➢ Enabling all the different people involved in the AI project to have the appropriate
access to data, tools, and processes in order to collaborate across different stages of
the model building is critical to its success.
➢ Another key success factor to consider is model validation: how will you determine,
measure, and evaluate the performance of each iteration with regards to the defined
ROI objective?
During this phase, you need to evaluate the various AI development platforms,
e.g.:
➢ Open Languages — Python is the most popular, with R and Scala also in the mix.
➢ Open Frameworks — Scikit-learn, XG Boost, TensorFlow, etc.
➢ Approaches and Techniques — Classic ML techniques from regression all the
way to state-of-the-art GANs and RL
➢ Productivity-Enhancing Capabilities — Visual modelling, Auto AI to help with
feature engineering, algorithm selection and hyperparameter optimization
➢ Development Tools — Data Robot, H2O, Watson Studio, Azure ML Studio, Sage
maker, Anaconda, etc.
Different AI development platforms offer extensive documentation to help the
development teams. Depending on your choice of the AI platform, you need to visit
the appropriate webpages for this documentation, which are as follows:
➢ Microsoft Azure AI Platform;
➢ Google Cloud AI Platform;
➢ IBM Watson Developer platform;
➢ Big ML;
➢ Infosys Nia resources.
Step 3: Testing
While the fundamental testing concepts are fully applicable in AI development
projects, there are additional considerations too. These are as follows: