MODEL LIFE CYCLE
• We plan out the tasks in our day to day life
• We have plans for each activity to complete
• Similarly need to create AI project
• AI model life cycle offers suitable structure to create
the AI project
What we learn in this chapter :
• Different stages of AI model life cycle
• Select the correct AI algorithm for your model
(project)
• Understand the importance of effective problem
statement .
Stages of AI Model Lifecycle
• Phase I : Project planning ,Data collection
• Phase II : Design and Testing the AI Model
• Phase III : Deployment & Maintenance at client – site
Deployment
Feedback
AI Project Life Cycle
• Encompasses – 3 main stages
1) Project Scoping (Problem scoping is the process of
defining the boundaries, goals, and constraints of
a problem before attempting to solve it
2) Design
3) Build Phase
4) Deployment in production
Phase I : Project planning & Data
Collection
• It has three stages :
a) Problem scoping
b) Data acquisition
c) Data exploration
Problem scoping
• First need to understand the problem description and
business limitations .
• Business limitations- assist in realizing the required
solutions quality and terms
• Two scenarios:
• Google translate
1. What are commercial constraints ?
2. Model should comprehending text data
3. The result – linguistically correct as feasible
4. Minor mistakes – tolerable
5. Results – should be in milliseconds
• AI system Predict specific tumor based on CT
images
• The Model – detect pattern in images
• False forecasts- disastrous effects . Errors can be
fatal.
• I hour- it take time to reveal the outcome but precise
• I st scenario – Text based output
• 2 nd scenario – categorization / classification –
patient is healthy or not
• Scoping problem – Difficult – need deeper
understanding
• Image gets clearer – able to find the result
• 4Ws problem canvas – assist in identifying
important factors associated with the problem
DATA ACQUISITION
• Data Analysis – collect data from credible sources.
(trusted source)
• Real world data – strange & deceptive(false data)
• Human entries – prone to mistakes
• Example :
• Someone mistyping 40.0 as 400, labelling the data
incorrectly
• Data – needs to be relevant & authentic (real
data)
• Data is gathered from variety of sources :
• Government websites
• Devices such as camera and sensors
• Purchases , transactions , registrations and
• Other public surveys and records
DATA EXPLORATION
• Data cleaning – locate missing values
• Eliminate unwanted data
• Perform basic statistical analysis –drawing graphs
&comparing different properties of data set are carried
out
• Initial insighs- understanding of the data helps in
algorithm section , metrics choice (standard of
measurement) etc
• The above procedure is called “Exploratory data
analysis ”
• Identify – which elements are more essential & what
• Quality of data – need to given to AI model
• Data exploration stage – need to give utmost care
• This data exploration stage – consume – most time
Phase II: Design & Testing the AI
Model
• Phase II – Two stages
• Modelling
• Evaluation
Modelling
• AI model – ability to characterize the relationship
between parameters (values)
• AI model – referring to – mathematical approach to
data analysis
• Modelling – process – several models based on graphical
data constructed and tested
• ML Engineers – go through multiple models to
determine the best model configuration
• Design phase – Iterative process.
• Hyperparameter fine tuning – by ML framework helps
to narrow down number of feasible solutions
• It is vital – In AI project , every individual have
proper access to data , tools & process to
collaborate across different phases of model
creation.
• Various AI development platforms :
• Open languages – python , R and scala
• Open frameworks(provide some functionality) –
scikit-learn, XGBoost , TensorFlow
• Approaches & techniques :ML techniques from
regression, Reinforcement learning, Generative
adversarial networks(GAN) framework
• Productivity –Increasing capacities: visual
modelling(graphic representation of objects) ,
Automated ML(Auto AI) to help with feature
engineering , selection of appropriate algorithm
and hyperparameter optimization
• Feature Engineering – is the process of selecting,
manipulating and transforming raw data into
features that can be used in supervised learning.
• Tools to help in development process : DataRobot,
H2O, Watson studio,Azure ML studio , sagemaker,
Anaconda etc….
• AI development platforms provide documentation –
to assist development teams.
• Depend on the AI platform following web pages can
choose for this documentation.
• Microsoft Azure AI platform’
• Google cloud AI platform
• IBM Watson Developer platform
• BigML
• Infosys Nia Resources
EVALUATION
• Once model is created and trained – need to properly
tested to calculate the model efficiency &
performance .
• Model is evaluated using – Testing data & model
efficiency is assessed.
• Measurements will differ depending on the
problem
• For regression problem – MSE or MAE is used
• Classification model – used for balanced dataset
• Advanced metrics(F1 score) - used for imbalanced
sets
• Separate validation dataset – Evaluation during
training
• It monitors how well our model generalizes, avoiding
bias and overfitting ( fail to predict future
observations , only working with closed dataset)
• Few things consider during this stage too
• Volume of test data can be huge – provide data
complexities
• Human biases – data might have a negative impact
on the testing phase- data validation is critical.
• Testing team – put AI & ML algorithms through
rigorous testing while maintaining model validity
& keeping successful learning ability & algorithm
efficacy in mind .
• AI system deals – sensitive data, regulatory
compliance (specific regulations)and security testing
are essential
• Sheer volume of data- performance testing is
critical
• If AI solution requires data from other systems –
Systems integration testing is critical
• All training data in the AI system should include
in test data
• The testing team – develop test suites(collection of
Phase III – Deployment &
Maintenance
• Phase III divided into two stages:
• Deployment and Feedback
• Model is ready – Production
• AI Engineers – deploy a trained model making it
available for external inference requests
• This is the final phase of machine learning life
cycle .
• The deployed model’s performance should be
monitored & ensure that it continues to function
at the level required by the business.
• Several detrimental(harmful or damaging) effects
that can occur over time .
• Model deterioration is the most common .
• Gather samples which is incorrectly processed by
models to find the root cause reasons why this occurred
• Use this technique to retain the model to make it
more Robust(strong)
• This continuous montitoring of the model helps in
better understanding any unforeseen occurrences
that model isn’t prepared for.