SlideShare a Scribd company logo
1 of 26
Applied Artificial
Intelligence in
Toxicology
Marc A.T. Teunis, PhD,
Associate professor,
University of Applied Sciences, Utrecht
The Netherlands
https://www.slideshare.net/MarcTeunis/ai-in-toxicology-
lecture-a-handson-introduction
Contents
INTRODUCTION TO MACHINE
LEARNING
HOW DO WE PRACTICALLY
BUILD MACHINE LEARNING
MODELS?
HANDS-ON EXAMPLE WITH
TIDYMODELS AND
TENSORFLOW IN R
AI IN TOXICOLOGY -
EXAMPLES
14 De. 2023 AI in Tox. 2
Managing
expectations
AI in Tox. 14 De. 2023 3
DALL-E, December 2023
“Create an image showing the concept 'manage
expectations' in relation to me giving a 1.5 hour
lecture on AI in toxicology. It is way not enough
time to introduce people to AI, so we are merely
scratching the surface. If you want to learn more
and want to start using AI in your own work, I
highly recommend taking a series of courses.
e.g.:
https://www.coursera.org/specializations/data-science-
statistics-machine-learning
TLDR
Introduction to machine AI
Artificial
Intelligence
"the theory and development of computer
systems able to perform tasks normally
requiring human intelligence, such as visual
perception, speech recognition, decision-
making, translation between languages,
and generation of content.
GAI
NLP
ML
DL
GA
AI: Artificial Intelligence; ML: Machine Learning; DL: Deep Learning;
NLP: Natural Language Processing; GA: Graph Algorithms, GAI: Generative AI
AI
5
Machine learning
Adapted from Deep Learning with R, Cholet & Allaire, 2019
Classical
programming for
problem solving
Machine Learning
Rules
Answers
Data
Data
Answers
In machine learning, the ‘machine’ is
presented with examples relevant to the task
and needs to figure out the rules.
Rules
6
Elementary algorithm
𝑃𝑤 ∈ 𝑋 < 0 , 𝑃𝑏 ∈ 𝑋 > 0
Example adapted from Deep Learning with R, Cholet & Allaire, 2019
Construct an algorithm that can classify a dot for class ‘white’ or ‘black’
7
What do we need for machine learning?
Classify
pictures that
contain much
green
Machine learning algorithm
Optimize the amount of
saturation for the input
picture
HSV
RGB
Based on coordinates,
what color is our point?
How is the data
represented to answer
the output question?
Example adapted from Deep Learning with R, Cholet & Allaire, 2019
INPUT DATA
A way to measure whether the algorithm is doing a good job
8
Steps to build machine learning models (CRISP-DM)
https://en.wikipedia.org/wiki/Cross-
industry_standard_process_for_data_mining 9
Chosing an ML model -> Articulate the problem
Classification
• Needs labelled data
• Binary vs Multi-class
• ML and DL methods
Clustering
• Unlabeled data
• ML and DL methods
Regression
• Numeric output
• ML and DL methods
• Time series, forcasting
Rank
• List of ranked objects
• ML and DL methods
Graph
• Fragments and structures
• Graph embeddings
• DL methods
10
Start with Exploratory Data Analysis & use code to do it.
• Check data quality, exploratory data
analysis
• Subset data
• Clean data
• Feature engineering
• Enrich data from external sources
• Investigate effects of imputation
• Explore patterns with inferential
statistics
• Prepare data for analysis -> transform
data to tensors
For robustness, traceability and reproducibility:
Applying the 7 principles of Guerilla Analytics is highly
desirable.
Principle 1: Space is cheap, confusion is expensive
Principle 2: Prefer simple, visual project structures and
conventions
Principle 3: Prefer automation with program code
Principle 4: Maintain a link between data on the file system,
data in the analytics environment, and data in work
products
Principle 5: Version control changes to data and analytics
code
Principle 6: Consolidate team knowledge in version-
controlled builds
Principle 7: Prefer analytics code that runs from start to
finish
https://guerrilla-analytics.net/the-principles/
EDA = Exploratory Data Analysis, see for tips in R:
https://bookdown.org/rdpeng/exdata/ by Roger Peng
14 De. 2023 AI in Tox. 11
What is a deep learning model?
Neural Network
14 De. 2023 AI in Tox. 13
....the term “deep learning” comes from neural networks that
contains several hidden layers, also called “deep neural
networks”
https://towardsdatascience.com/first-neural-network-for-
beginners-explained-with-code-4cfd37e06eaf
Choosing the right model
Type of learning/task
Pattern recognition /
Classification / Correlation
Supervised active learning
Problem solving / Transfer learning
Reinforcement learning
Generative AI
15
14 De. 2023 AI in Tox. 16
How do we build a deep
learning model?
A minimal deep learning network (Perceptron)
Adapted from Deep Learning with R, Cholet & Allaire, 2019
activation = “relu”, units = 256
Input output
class
A
A
B
A
B
B
Train data
Test data
Learning efficiency / loss function (loss = ”binary_crossentropy”,
optimizer = "rmsprop")
Model validation (metrics = “accuracy”)
In machine learning,
a category in a classification problem is called a class.
Data points are called samples.
The class associated with a specific sample is called a
label.
sample
label
category
activation = “softmax”, units = 3
18
Choosing an architecture
• Select model for the task
• Start simple
• Experiment with the topology or model
flavor
• Use data partitioning or K-fold cross
validation
• Run with simulations of the data
• Compare methods/models to compare
performance
• Tune hyperparameters
14 De. 2023 AI in Tox. 19
Input data for Deep Learning
models
- Tensors -
Tensors as
input for
neural
networks
Tensors are generalizations of
vectors, that function as input for ML
algorithms.
Let’s look at some examples
14 De. 2023 AI in Tox. 21
Tensors
https://towardsdatascience.com/deep-learning-introduction-
to-tensors-tensorflow-36ce3663528f
1D Tensor: No real-world data
2D Tensor: Vector data
(samples, features)
3D Tensor: Time series or sequence
(samples, timesteps,
features)
4D Tensor: Images
(samples, height, width,
channels) or
(samples, channels,
height, width)
5D Tensor: Video
(samples, frames, height,
width, channels)
14 De. 2023 AI in Tox. 22
Where to start?
Open Source Programming languages /
frameworks
• Statistics
• Machine
Learning
• Deep Learning
• Visualization
• Bioinformatics
• Statistics
• Machine Learning
• Deep Learning
• Visualization
• Bioinformatics
• Natural Language
Processing
• Chem-informatics
(RDKit)
• Graph Database
• Graph Visualization
• Graph Algorithms
https://rviews.rstudio.com/2020/07/20/shallow-neural-net-
from-scratch-using-r-part-1/
https://rviews.rstudio.com/2020/07/24/building-a-neural-net-
from-scratch-using-r-part-2/ 24
Tidymodels (hands on example)
14 De. 2023 AI in Tox. 25
1. Split data
2. Model specification
3. Recipe (algorithm, engine, task, data, predictors)
4. Workflow (model specs + recipe)
5. Tune
6. Fit
7. Test
8. Evaluate
Hands-on AI examples in
Toxicology (in R)

More Related Content

What's hot

Mетоде изучавања у генетици човека
Mетоде изучавања у генетици човекаMетоде изучавања у генетици човека
Mетоде изучавања у генетици човекаAlleteja
 
Ekološka niša
Ekološka nišaEkološka niša
Ekološka nišaEna Horvat
 
Sisari-opšte odlike
Sisari-opšte odlikeSisari-opšte odlike
Sisari-opšte odlikeEna Horvat
 
заједничке особине живих бића
заједничке особине живих бићазаједничке особине живих бића
заједничке особине живих бића1kreativac
 
Eticka dimenzija globalizacije
Eticka dimenzija globalizacijeEticka dimenzija globalizacije
Eticka dimenzija globalizacijeAdesignhr
 
L133 - Istorija - Antički Rim - Jovana Vasić - Svetlana Đurđević
L133 - Istorija - Antički Rim - Jovana Vasić - Svetlana ĐurđevićL133 - Istorija - Antički Rim - Jovana Vasić - Svetlana Đurđević
L133 - Istorija - Antički Rim - Jovana Vasić - Svetlana ĐurđevićNašaŠkola.Net
 
Poluga, moment sile
Poluga, moment silePoluga, moment sile
Poluga, moment sileAnaStas1
 
Nivoi organizacije, ćelija i ćelijska deoba-ponavljanje
Nivoi organizacije, ćelija i ćelijska deoba-ponavljanjeNivoi organizacije, ćelija i ćelijska deoba-ponavljanje
Nivoi organizacije, ćelija i ćelijska deoba-ponavljanjeEna Horvat
 
7. Критско - микенски свет
7. Критско - микенски свет7. Критско - микенски свет
7. Критско - микенски светMilan Milanović
 
Gradja omotaca atoma elemenata
Gradja omotaca atoma elemenataGradja omotaca atoma elemenata
Gradja omotaca atoma elemenataIvanaIvanovi5
 
нафта, земни гас и угаљ 3.
нафта, земни гас и угаљ 3.нафта, земни гас и угаљ 3.
нафта, земни гас и угаљ 3.vvlivvli
 

What's hot (20)

Mетоде изучавања у генетици човека
Mетоде изучавања у генетици човекаMетоде изучавања у генетици човека
Mетоде изучавања у генетици човека
 
Python - osnove
Python - osnovePython - osnove
Python - osnove
 
Ekološka niša
Ekološka nišaEkološka niša
Ekološka niša
 
Petrovići ii
Petrovići iiPetrovići ii
Petrovići ii
 
Raznovrsnost zivog sveta
Raznovrsnost zivog svetaRaznovrsnost zivog sveta
Raznovrsnost zivog sveta
 
Sisari-opšte odlike
Sisari-opšte odlikeSisari-opšte odlike
Sisari-opšte odlike
 
заједничке особине живих бића
заједничке особине живих бићазаједничке особине живих бића
заједничке особине живих бића
 
Provera znanja 7 iz fiz
Provera znanja 7 iz fizProvera znanja 7 iz fiz
Provera znanja 7 iz fiz
 
Nukleinske kiseline i proteini
Nukleinske kiseline i proteini Nukleinske kiseline i proteini
Nukleinske kiseline i proteini
 
Eticka dimenzija globalizacije
Eticka dimenzija globalizacijeEticka dimenzija globalizacije
Eticka dimenzija globalizacije
 
L133 - Istorija - Antički Rim - Jovana Vasić - Svetlana Đurđević
L133 - Istorija - Antički Rim - Jovana Vasić - Svetlana ĐurđevićL133 - Istorija - Antički Rim - Jovana Vasić - Svetlana Đurđević
L133 - Istorija - Antički Rim - Jovana Vasić - Svetlana Đurđević
 
Prva industrijska revolucija
Prva industrijska revolucijaPrva industrijska revolucija
Prva industrijska revolucija
 
Poluga, moment sile
Poluga, moment silePoluga, moment sile
Poluga, moment sile
 
Nivoi organizacije, ćelija i ćelijska deoba-ponavljanje
Nivoi organizacije, ćelija i ćelijska deoba-ponavljanjeNivoi organizacije, ćelija i ćelijska deoba-ponavljanje
Nivoi organizacije, ćelija i ćelijska deoba-ponavljanje
 
сила трења 1
сила трења 1сила трења 1
сила трења 1
 
Helenizam
HelenizamHelenizam
Helenizam
 
4.стари египат
4.стари египат4.стари египат
4.стари египат
 
7. Критско - микенски свет
7. Критско - микенски свет7. Критско - микенски свет
7. Критско - микенски свет
 
Gradja omotaca atoma elemenata
Gradja omotaca atoma elemenataGradja omotaca atoma elemenata
Gradja omotaca atoma elemenata
 
нафта, земни гас и угаљ 3.
нафта, земни гас и угаљ 3.нафта, земни гас и угаљ 3.
нафта, земни гас и угаљ 3.
 

Similar to lecture-intro-pet-nams-ai-in-toxicology.pptx

Regression with Microsoft Azure & Ms Excel
Regression with Microsoft Azure & Ms ExcelRegression with Microsoft Azure & Ms Excel
Regression with Microsoft Azure & Ms ExcelDr. Abdul Ahad Abro
 
Applied AI Workshop - Presentation - Connect Day GDL
Applied AI Workshop - Presentation - Connect Day GDLApplied AI Workshop - Presentation - Connect Day GDL
Applied AI Workshop - Presentation - Connect Day GDLMarc Teunis
 
Self Study Business Approach to DS_01022022.docx
Self Study Business Approach to DS_01022022.docxSelf Study Business Approach to DS_01022022.docx
Self Study Business Approach to DS_01022022.docxShanmugasundaram M
 
Data Science as a Service: Intersection of Cloud Computing and Data Science
Data Science as a Service: Intersection of Cloud Computing and Data ScienceData Science as a Service: Intersection of Cloud Computing and Data Science
Data Science as a Service: Intersection of Cloud Computing and Data SciencePouria Amirian
 
Data Science as a Service: Intersection of Cloud Computing and Data Science
Data Science as a Service: Intersection of Cloud Computing and Data ScienceData Science as a Service: Intersection of Cloud Computing and Data Science
Data Science as a Service: Intersection of Cloud Computing and Data SciencePouria Amirian
 
Building a performing Machine Learning model from A to Z
Building a performing Machine Learning model from A to ZBuilding a performing Machine Learning model from A to Z
Building a performing Machine Learning model from A to ZCharles Vestur
 
introduction to machine learning
introduction to machine learningintroduction to machine learning
introduction to machine learningJohnson Ubah
 
Machine learning for sensor Data Analytics
Machine learning for sensor Data AnalyticsMachine learning for sensor Data Analytics
Machine learning for sensor Data AnalyticsMATLABISRAEL
 
Train, explain, acclaim. Build a good model in three steps
Train, explain, acclaim.  Build a good model in three stepsTrain, explain, acclaim.  Build a good model in three steps
Train, explain, acclaim. Build a good model in three stepsPrzemek Biecek
 
AI TESTING: ENSURING A GOOD DATA SPLIT BETWEEN DATA SETS (TRAINING AND TEST) ...
AI TESTING: ENSURING A GOOD DATA SPLIT BETWEEN DATA SETS (TRAINING AND TEST) ...AI TESTING: ENSURING A GOOD DATA SPLIT BETWEEN DATA SETS (TRAINING AND TEST) ...
AI TESTING: ENSURING A GOOD DATA SPLIT BETWEEN DATA SETS (TRAINING AND TEST) ...ijsc
 
Intro/Overview on Machine Learning Presentation
Intro/Overview on Machine Learning PresentationIntro/Overview on Machine Learning Presentation
Intro/Overview on Machine Learning PresentationAnkit Gupta
 
Data-centric AI and the convergence of data and model engineering: opportunit...
Data-centric AI and the convergence of data and model engineering:opportunit...Data-centric AI and the convergence of data and model engineering:opportunit...
Data-centric AI and the convergence of data and model engineering: opportunit...Paolo Missier
 
Introduction au machine learning
Introduction au machine learningIntroduction au machine learning
Introduction au machine learningJulienDuquennoy1
 
Introduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-LearnIntroduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-LearnBenjamin Bengfort
 
Data Science Salon: Introduction to Machine Learning - Marketing Use Case
Data Science Salon: Introduction to Machine Learning - Marketing Use CaseData Science Salon: Introduction to Machine Learning - Marketing Use Case
Data Science Salon: Introduction to Machine Learning - Marketing Use CaseFormulatedby
 
Data Science Salon Miami Presentation
Data Science Salon Miami PresentationData Science Salon Miami Presentation
Data Science Salon Miami PresentationGreg Werner
 

Similar to lecture-intro-pet-nams-ai-in-toxicology.pptx (20)

Regression with Microsoft Azure & Ms Excel
Regression with Microsoft Azure & Ms ExcelRegression with Microsoft Azure & Ms Excel
Regression with Microsoft Azure & Ms Excel
 
Applied AI Workshop - Presentation - Connect Day GDL
Applied AI Workshop - Presentation - Connect Day GDLApplied AI Workshop - Presentation - Connect Day GDL
Applied AI Workshop - Presentation - Connect Day GDL
 
Machine learning
 Machine learning Machine learning
Machine learning
 
Self Study Business Approach to DS_01022022.docx
Self Study Business Approach to DS_01022022.docxSelf Study Business Approach to DS_01022022.docx
Self Study Business Approach to DS_01022022.docx
 
Data Science as a Service: Intersection of Cloud Computing and Data Science
Data Science as a Service: Intersection of Cloud Computing and Data ScienceData Science as a Service: Intersection of Cloud Computing and Data Science
Data Science as a Service: Intersection of Cloud Computing and Data Science
 
Data Science as a Service: Intersection of Cloud Computing and Data Science
Data Science as a Service: Intersection of Cloud Computing and Data ScienceData Science as a Service: Intersection of Cloud Computing and Data Science
Data Science as a Service: Intersection of Cloud Computing and Data Science
 
Building a performing Machine Learning model from A to Z
Building a performing Machine Learning model from A to ZBuilding a performing Machine Learning model from A to Z
Building a performing Machine Learning model from A to Z
 
introduction to machine learning
introduction to machine learningintroduction to machine learning
introduction to machine learning
 
Machine learning for sensor Data Analytics
Machine learning for sensor Data AnalyticsMachine learning for sensor Data Analytics
Machine learning for sensor Data Analytics
 
Machine Learning_Unit 2_Full.ppt.pdf
Machine Learning_Unit 2_Full.ppt.pdfMachine Learning_Unit 2_Full.ppt.pdf
Machine Learning_Unit 2_Full.ppt.pdf
 
Train, explain, acclaim. Build a good model in three steps
Train, explain, acclaim.  Build a good model in three stepsTrain, explain, acclaim.  Build a good model in three steps
Train, explain, acclaim. Build a good model in three steps
 
AI TESTING: ENSURING A GOOD DATA SPLIT BETWEEN DATA SETS (TRAINING AND TEST) ...
AI TESTING: ENSURING A GOOD DATA SPLIT BETWEEN DATA SETS (TRAINING AND TEST) ...AI TESTING: ENSURING A GOOD DATA SPLIT BETWEEN DATA SETS (TRAINING AND TEST) ...
AI TESTING: ENSURING A GOOD DATA SPLIT BETWEEN DATA SETS (TRAINING AND TEST) ...
 
Intro/Overview on Machine Learning Presentation
Intro/Overview on Machine Learning PresentationIntro/Overview on Machine Learning Presentation
Intro/Overview on Machine Learning Presentation
 
Data-centric AI and the convergence of data and model engineering: opportunit...
Data-centric AI and the convergence of data and model engineering:opportunit...Data-centric AI and the convergence of data and model engineering:opportunit...
Data-centric AI and the convergence of data and model engineering: opportunit...
 
ODSC APAC 2022 - Explainable AI
ODSC APAC 2022 - Explainable AIODSC APAC 2022 - Explainable AI
ODSC APAC 2022 - Explainable AI
 
Introduction au machine learning
Introduction au machine learningIntroduction au machine learning
Introduction au machine learning
 
Introduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-LearnIntroduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-Learn
 
Managing machine learning
Managing machine learningManaging machine learning
Managing machine learning
 
Data Science Salon: Introduction to Machine Learning - Marketing Use Case
Data Science Salon: Introduction to Machine Learning - Marketing Use CaseData Science Salon: Introduction to Machine Learning - Marketing Use Case
Data Science Salon: Introduction to Machine Learning - Marketing Use Case
 
Data Science Salon Miami Presentation
Data Science Salon Miami PresentationData Science Salon Miami Presentation
Data Science Salon Miami Presentation
 

Recently uploaded

Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral AnalysisRaman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral AnalysisDiwakar Mishra
 
Botany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsBotany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsSumit Kumar yadav
 
GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)Areesha Ahmad
 
Zoology 4th semester series (krishna).pdf
Zoology 4th semester series (krishna).pdfZoology 4th semester series (krishna).pdf
Zoology 4th semester series (krishna).pdfSumit Kumar yadav
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...Sérgio Sacani
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxUmerFayaz5
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...anilsa9823
 
GFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxGFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxAleenaTreesaSaji
 
Broad bean, Lima Bean, Jack bean, Ullucus.pptx
Broad bean, Lima Bean, Jack bean, Ullucus.pptxBroad bean, Lima Bean, Jack bean, Ullucus.pptx
Broad bean, Lima Bean, Jack bean, Ullucus.pptxjana861314
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksSérgio Sacani
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)PraveenaKalaiselvan1
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoSérgio Sacani
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...jana861314
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhousejana861314
 
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 60009654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000Sapana Sha
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...Sérgio Sacani
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Sérgio Sacani
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...RohitNehra6
 
Chromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATINChromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATINsankalpkumarsahoo174
 

Recently uploaded (20)

Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral AnalysisRaman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
 
Botany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsBotany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questions
 
GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)
 
Zoology 4th semester series (krishna).pdf
Zoology 4th semester series (krishna).pdfZoology 4th semester series (krishna).pdf
Zoology 4th semester series (krishna).pdf
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptx
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
 
GFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxGFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptx
 
Broad bean, Lima Bean, Jack bean, Ullucus.pptx
Broad bean, Lima Bean, Jack bean, Ullucus.pptxBroad bean, Lima Bean, Jack bean, Ullucus.pptx
Broad bean, Lima Bean, Jack bean, Ullucus.pptx
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disks
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on Io
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
 
The Philosophy of Science
The Philosophy of ScienceThe Philosophy of Science
The Philosophy of Science
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhouse
 
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 60009654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...
 
Chromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATINChromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATIN
 

lecture-intro-pet-nams-ai-in-toxicology.pptx

  • 1. Applied Artificial Intelligence in Toxicology Marc A.T. Teunis, PhD, Associate professor, University of Applied Sciences, Utrecht The Netherlands https://www.slideshare.net/MarcTeunis/ai-in-toxicology- lecture-a-handson-introduction
  • 2. Contents INTRODUCTION TO MACHINE LEARNING HOW DO WE PRACTICALLY BUILD MACHINE LEARNING MODELS? HANDS-ON EXAMPLE WITH TIDYMODELS AND TENSORFLOW IN R AI IN TOXICOLOGY - EXAMPLES 14 De. 2023 AI in Tox. 2
  • 3. Managing expectations AI in Tox. 14 De. 2023 3 DALL-E, December 2023 “Create an image showing the concept 'manage expectations' in relation to me giving a 1.5 hour lecture on AI in toxicology. It is way not enough time to introduce people to AI, so we are merely scratching the surface. If you want to learn more and want to start using AI in your own work, I highly recommend taking a series of courses. e.g.: https://www.coursera.org/specializations/data-science- statistics-machine-learning
  • 5. Artificial Intelligence "the theory and development of computer systems able to perform tasks normally requiring human intelligence, such as visual perception, speech recognition, decision- making, translation between languages, and generation of content. GAI NLP ML DL GA AI: Artificial Intelligence; ML: Machine Learning; DL: Deep Learning; NLP: Natural Language Processing; GA: Graph Algorithms, GAI: Generative AI AI 5
  • 6. Machine learning Adapted from Deep Learning with R, Cholet & Allaire, 2019 Classical programming for problem solving Machine Learning Rules Answers Data Data Answers In machine learning, the ‘machine’ is presented with examples relevant to the task and needs to figure out the rules. Rules 6
  • 7. Elementary algorithm 𝑃𝑤 ∈ 𝑋 < 0 , 𝑃𝑏 ∈ 𝑋 > 0 Example adapted from Deep Learning with R, Cholet & Allaire, 2019 Construct an algorithm that can classify a dot for class ‘white’ or ‘black’ 7
  • 8. What do we need for machine learning? Classify pictures that contain much green Machine learning algorithm Optimize the amount of saturation for the input picture HSV RGB Based on coordinates, what color is our point? How is the data represented to answer the output question? Example adapted from Deep Learning with R, Cholet & Allaire, 2019 INPUT DATA A way to measure whether the algorithm is doing a good job 8
  • 9. Steps to build machine learning models (CRISP-DM) https://en.wikipedia.org/wiki/Cross- industry_standard_process_for_data_mining 9
  • 10. Chosing an ML model -> Articulate the problem Classification • Needs labelled data • Binary vs Multi-class • ML and DL methods Clustering • Unlabeled data • ML and DL methods Regression • Numeric output • ML and DL methods • Time series, forcasting Rank • List of ranked objects • ML and DL methods Graph • Fragments and structures • Graph embeddings • DL methods 10
  • 11. Start with Exploratory Data Analysis & use code to do it. • Check data quality, exploratory data analysis • Subset data • Clean data • Feature engineering • Enrich data from external sources • Investigate effects of imputation • Explore patterns with inferential statistics • Prepare data for analysis -> transform data to tensors For robustness, traceability and reproducibility: Applying the 7 principles of Guerilla Analytics is highly desirable. Principle 1: Space is cheap, confusion is expensive Principle 2: Prefer simple, visual project structures and conventions Principle 3: Prefer automation with program code Principle 4: Maintain a link between data on the file system, data in the analytics environment, and data in work products Principle 5: Version control changes to data and analytics code Principle 6: Consolidate team knowledge in version- controlled builds Principle 7: Prefer analytics code that runs from start to finish https://guerrilla-analytics.net/the-principles/ EDA = Exploratory Data Analysis, see for tips in R: https://bookdown.org/rdpeng/exdata/ by Roger Peng 14 De. 2023 AI in Tox. 11
  • 12. What is a deep learning model?
  • 13. Neural Network 14 De. 2023 AI in Tox. 13 ....the term “deep learning” comes from neural networks that contains several hidden layers, also called “deep neural networks” https://towardsdatascience.com/first-neural-network-for- beginners-explained-with-code-4cfd37e06eaf
  • 15. Type of learning/task Pattern recognition / Classification / Correlation Supervised active learning Problem solving / Transfer learning Reinforcement learning Generative AI 15
  • 16. 14 De. 2023 AI in Tox. 16
  • 17. How do we build a deep learning model?
  • 18. A minimal deep learning network (Perceptron) Adapted from Deep Learning with R, Cholet & Allaire, 2019 activation = “relu”, units = 256 Input output class A A B A B B Train data Test data Learning efficiency / loss function (loss = ”binary_crossentropy”, optimizer = "rmsprop") Model validation (metrics = “accuracy”) In machine learning, a category in a classification problem is called a class. Data points are called samples. The class associated with a specific sample is called a label. sample label category activation = “softmax”, units = 3 18
  • 19. Choosing an architecture • Select model for the task • Start simple • Experiment with the topology or model flavor • Use data partitioning or K-fold cross validation • Run with simulations of the data • Compare methods/models to compare performance • Tune hyperparameters 14 De. 2023 AI in Tox. 19
  • 20. Input data for Deep Learning models - Tensors -
  • 21. Tensors as input for neural networks Tensors are generalizations of vectors, that function as input for ML algorithms. Let’s look at some examples 14 De. 2023 AI in Tox. 21
  • 22. Tensors https://towardsdatascience.com/deep-learning-introduction- to-tensors-tensorflow-36ce3663528f 1D Tensor: No real-world data 2D Tensor: Vector data (samples, features) 3D Tensor: Time series or sequence (samples, timesteps, features) 4D Tensor: Images (samples, height, width, channels) or (samples, channels, height, width) 5D Tensor: Video (samples, frames, height, width, channels) 14 De. 2023 AI in Tox. 22
  • 24. Open Source Programming languages / frameworks • Statistics • Machine Learning • Deep Learning • Visualization • Bioinformatics • Statistics • Machine Learning • Deep Learning • Visualization • Bioinformatics • Natural Language Processing • Chem-informatics (RDKit) • Graph Database • Graph Visualization • Graph Algorithms https://rviews.rstudio.com/2020/07/20/shallow-neural-net- from-scratch-using-r-part-1/ https://rviews.rstudio.com/2020/07/24/building-a-neural-net- from-scratch-using-r-part-2/ 24
  • 25. Tidymodels (hands on example) 14 De. 2023 AI in Tox. 25 1. Split data 2. Model specification 3. Recipe (algorithm, engine, task, data, predictors) 4. Workflow (model specs + recipe) 5. Tune 6. Fit 7. Test 8. Evaluate
  • 26. Hands-on AI examples in Toxicology (in R)

Editor's Notes

  1. Many of the classical statistical approaches are build according the first box. ML is fundamentally different because there is no direct instruction on how the problem needs to be solved. Only the data and the expected outcome are provided, the algorithm figures out the set of rules to arrive at new answers when new data (not seen before) are presented.
  2. All machine-learning algorithms consist of automatically finding such transformations that turn data into more-useful representations for a given task. These operations can be coordinate changes, as you just saw, or linear projections (which may destroy information), translations, nonlinear operations (such as “select all points such that x > 0”), and so on. Machine-learning algorithms aren’t usually creative in finding these transformations; they’re merely searching through a predefined set of operations, called a hypothesis space. So that’s what machine learning is, technically: searching for useful representations of some input data, within a predefined space of possibilities, using guidance from a feedback signal. This simple idea allows for solving a remarkably broad range of intellectual tasks, from speech recognition to autonomous car driving. Now that you understand what we mean by learning, let’s take a look at what makes deep learning special.
  3. First and foremost, the most important questions to ask are (1) “what are you attempting to solve for?” (2) “What is the desired outcome?” However, we must continuously remind ourselves that AI cannot be the panacea in itself. It’s a tool, not the entire solution itself. There are several techniques and many different problems to solve with AI. Think about this analogy that helps to explain the above. If you want to cook a tasty dish you have to know exactly what you are going to cook and all the ingredients that you need.
  4. While Wolfgang Kohler was interned at Tenerife, he devoted his energy to the study of Chimpanzees and their cognitive abilities. This picture is taken during one of the classical experiments where Kohler studied problem solving capacities. We see on the picture Grande’s attempts to reach to the treat hanging from the ceiling.