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

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

Work, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE PhysicsWork, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE Physicsvishikhakeshava1
 
Natural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsNatural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsAArockiyaNisha
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )aarthirajkumar25
 
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.PraveenaKalaiselvan1
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfSELF-EXPLANATORY
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trssuser06f238
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Patrick Diehl
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​kaibalyasahoo82800
 
Luciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptxLuciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptxAleenaTreesaSaji
 
TOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsTOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsssuserddc89b
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxkessiyaTpeter
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Module 4: Mendelian Genetics and Punnett Square
Module 4:  Mendelian Genetics and Punnett SquareModule 4:  Mendelian Genetics and Punnett Square
Module 4: Mendelian Genetics and Punnett SquareIsiahStephanRadaza
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...Sérgio Sacani
 
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tantaDashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tantaPraksha3
 
Recombination DNA Technology (Microinjection)
Recombination DNA Technology (Microinjection)Recombination DNA Technology (Microinjection)
Recombination DNA Technology (Microinjection)Jshifa
 
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCEPRINCE C P
 
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |aasikanpl
 

Recently uploaded (20)

Work, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE PhysicsWork, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE Physics
 
Natural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsNatural Polymer Based Nanomaterials
Natural Polymer Based Nanomaterials
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )
 
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 tr
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​
 
Luciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptxLuciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptx
 
TOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsTOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physics
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
 
Module 4: Mendelian Genetics and Punnett Square
Module 4:  Mendelian Genetics and Punnett SquareModule 4:  Mendelian Genetics and Punnett Square
Module 4: Mendelian Genetics and Punnett Square
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
 
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tantaDashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
 
Recombination DNA Technology (Microinjection)
Recombination DNA Technology (Microinjection)Recombination DNA Technology (Microinjection)
Recombination DNA Technology (Microinjection)
 
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
 
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
 

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.