SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Python with AI โ€“ 2
Session 5
Session recap
Session Number What is covered
1 Python basics โ€“ recap
2 pandas dataframes and histograms
3 Bar charts โ€“ REST API
4 REST API and Precision Recall
5 Scatter plots and ROC curve
6 ROC curve and line plots
7 Model boundary visualization
8 Final Projects
Appointment Planning dataset - kaggle
โ€ข Plot a histogram of the label column `No-show`
โ€ข What do you observe?
How do you overcome the skew problem?
โ€ข Resample the data to have equal frequency for the categories
โ€ข https://repl.it/@AIClubAcademy/appointmentData#main.py
Scatter plots (Classification)
โ€ข We will analyze the titanic dataset:
https://www.kaggle.com/c/titanic/data
Scatter Plots
โ€ข Libraries: matplotlib, seaborn
Scatter Plots โ€“ continuous variables
โ€ข Libraries: matplotlib
Scatter Plots โ€“ continuous variables
โ€ข Libraries: matplotlib
Scatter Plots โ€“ continuous variables
โ€ข Libraries: matplotlib
Scatter Plots โ€“ categorical variables
Both variables are categories. Create a matrix that shows
the number of occurrences in each combination
Scatter Plots โ€“ categorical variables
Both variables are categories. Create a matrix that shows
the number of occurrences in each combination
Sex/Pclass Male Female
1
2
3
Scatter Plots โ€“ categorical and continuous
Scatter plots - Regression
โ€ข Car prices dataset:
https://www.kaggle.com/CooperUnion/cardataset
Project Data Analysis
โ€ข Distribution of the prediction variable
โ€ข Scatter plots of the data
Github
โ€ข Please create an account at github: https://github.com/
Model - analysis
โ€ข Confusion Matrix
โ€ข Precision
โ€ข Recall
๐‘ƒ๐‘Ÿ๐‘’๐‘๐‘–๐‘ ๐‘–๐‘œ๐‘› =
๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘ 
๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘  + ๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘–๐‘ฃ๐‘’๐‘ 
๐‘…๐‘’๐‘๐‘Ž๐‘™๐‘™ =
๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘ 
๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘  + ๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘๐‘’๐‘”๐‘Ž๐‘ก๐‘–๐‘ฃ๐‘’๐‘ 
Model - analysis
โ€ข Confusion Matrix
โ€ข Precision
โ€ข Recall
โ€ข False Positive Rate
๐‘ƒ๐‘Ÿ๐‘’๐‘๐‘–๐‘ ๐‘–๐‘œ๐‘› =
๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘ 
๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘  + ๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘–๐‘ฃ๐‘’๐‘ 
๐‘…๐‘’๐‘๐‘Ž๐‘™๐‘™ =
๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘ 
๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘  + ๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘๐‘’๐‘”๐‘Ž๐‘ก๐‘–๐‘ฃ๐‘’๐‘ 
๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘๐‘œ๐‘ ๐‘–๐‘ก๐‘–๐‘ฃ๐‘’ ๐‘Ÿ๐‘Ž๐‘ก๐‘’ =
๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘–๐‘ฃ๐‘’
๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘–๐‘ฃ๐‘’ + ๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘๐‘’๐‘”๐‘Ž๐‘ก๐‘–๐‘ฃ๐‘’
Model - analysis
โ€ข Confusion Matrix
โ€ข Precision
โ€ข Recall
โ€ข False Positive Rate
โ€ข True positive rate =
Recall = Sensitivity
๐‘ƒ๐‘Ÿ๐‘’๐‘๐‘–๐‘ ๐‘–๐‘œ๐‘› =
๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘ 
๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘  + ๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘–๐‘ฃ๐‘’๐‘ 
๐‘…๐‘’๐‘๐‘Ž๐‘™๐‘™ =
๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘ 
๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘  + ๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘๐‘’๐‘”๐‘Ž๐‘ก๐‘–๐‘ฃ๐‘’๐‘ 
๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘๐‘œ๐‘ ๐‘–๐‘ก๐‘–๐‘ฃ๐‘’ ๐‘Ÿ๐‘Ž๐‘ก๐‘’ =
๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘–๐‘ฃ๐‘’
๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘–๐‘ฃ๐‘’ + ๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘๐‘’๐‘”๐‘Ž๐‘ก๐‘–๐‘ฃ๐‘’
ROC curve
http://aiclub.world

Weitere รคhnliche Inhalte

ร„hnlich wie Pa2 session 5

ensembles_emptytemplate_v2
ensembles_emptytemplate_v2ensembles_emptytemplate_v2
ensembles_emptytemplate_v2Shrayes Ramesh
ย 
Matplotlib Review 2021
Matplotlib Review 2021Matplotlib Review 2021
Matplotlib Review 2021Bhaskar J.Roy
ย 
Matplotlib_Complete review_2021_abridged_version
Matplotlib_Complete review_2021_abridged_versionMatplotlib_Complete review_2021_abridged_version
Matplotlib_Complete review_2021_abridged_versionBhaskar J.Roy
ย 
Scaling up genomic analysis with ADAM
Scaling up genomic analysis with ADAMScaling up genomic analysis with ADAM
Scaling up genomic analysis with ADAMfnothaft
ย 
SPC: Fundamentos por Matt Savage
SPC: Fundamentos por Matt SavageSPC: Fundamentos por Matt Savage
SPC: Fundamentos por Matt SavageBlackberry&Cross
ย 
R, Data Wrangling & Kaggle Data Science Competitions
R, Data Wrangling & Kaggle Data Science CompetitionsR, Data Wrangling & Kaggle Data Science Competitions
R, Data Wrangling & Kaggle Data Science CompetitionsKrishna Sankar
ย 
Processing Large Graphs
Processing Large GraphsProcessing Large Graphs
Processing Large GraphsNishant Gandhi
ย 
Seqr - Protein Sequence Search: Presented by Lianyi Han, Medical Science & Co...
Seqr - Protein Sequence Search: Presented by Lianyi Han, Medical Science & Co...Seqr - Protein Sequence Search: Presented by Lianyi Han, Medical Science & Co...
Seqr - Protein Sequence Search: Presented by Lianyi Han, Medical Science & Co...Lucidworks
ย 
Using Graph Analysis and Fraud Detection in the Fintech Industry
Using Graph Analysis and Fraud Detection in the Fintech IndustryUsing Graph Analysis and Fraud Detection in the Fintech Industry
Using Graph Analysis and Fraud Detection in the Fintech IndustryStanka Dalekova
ย 
Using Graph Analysis and Fraud Detection in the Fintech Industry
Using Graph Analysis and Fraud Detection in the Fintech IndustryUsing Graph Analysis and Fraud Detection in the Fintech Industry
Using Graph Analysis and Fraud Detection in the Fintech IndustryStanka Dalekova
ย 
Kx for wine tasting
Kx for wine tastingKx for wine tasting
Kx for wine tastingMark Lefevre, CQF
ย 
IBANK - Big data www.ibank.uk.com 07474222079
IBANK - Big data www.ibank.uk.com 07474222079IBANK - Big data www.ibank.uk.com 07474222079
IBANK - Big data www.ibank.uk.com 07474222079ibankuk
ย 
Dev Games!
Dev Games!Dev Games!
Dev Games!Adam Haley
ย 
Explainability for Learning to Rank
Explainability for Learning to RankExplainability for Learning to Rank
Explainability for Learning to RankSease
ย 
Sean Kandel - Data profiling: Assessing the overall content and quality of a ...
Sean Kandel - Data profiling: Assessing the overall content and quality of a ...Sean Kandel - Data profiling: Assessing the overall content and quality of a ...
Sean Kandel - Data profiling: Assessing the overall content and quality of a ...huguk
ย 

ร„hnlich wie Pa2 session 5 (20)

Big data
Big dataBig data
Big data
ย 
Big data
Big dataBig data
Big data
ย 
Hadoop PDF
Hadoop PDFHadoop PDF
Hadoop PDF
ย 
ensembles_emptytemplate_v2
ensembles_emptytemplate_v2ensembles_emptytemplate_v2
ensembles_emptytemplate_v2
ย 
Matplotlib Review 2021
Matplotlib Review 2021Matplotlib Review 2021
Matplotlib Review 2021
ย 
Matplotlib_Complete review_2021_abridged_version
Matplotlib_Complete review_2021_abridged_versionMatplotlib_Complete review_2021_abridged_version
Matplotlib_Complete review_2021_abridged_version
ย 
Scaling up genomic analysis with ADAM
Scaling up genomic analysis with ADAMScaling up genomic analysis with ADAM
Scaling up genomic analysis with ADAM
ย 
SPC: Fundamentos por Matt Savage
SPC: Fundamentos por Matt SavageSPC: Fundamentos por Matt Savage
SPC: Fundamentos por Matt Savage
ย 
R, Data Wrangling & Kaggle Data Science Competitions
R, Data Wrangling & Kaggle Data Science CompetitionsR, Data Wrangling & Kaggle Data Science Competitions
R, Data Wrangling & Kaggle Data Science Competitions
ย 
Big data
Big dataBig data
Big data
ย 
Processing Large Graphs
Processing Large GraphsProcessing Large Graphs
Processing Large Graphs
ย 
Introduction to Genetic algorithm and its significance in VLSI design and aut...
Introduction to Genetic algorithm and its significance in VLSI design and aut...Introduction to Genetic algorithm and its significance in VLSI design and aut...
Introduction to Genetic algorithm and its significance in VLSI design and aut...
ย 
Seqr - Protein Sequence Search: Presented by Lianyi Han, Medical Science & Co...
Seqr - Protein Sequence Search: Presented by Lianyi Han, Medical Science & Co...Seqr - Protein Sequence Search: Presented by Lianyi Han, Medical Science & Co...
Seqr - Protein Sequence Search: Presented by Lianyi Han, Medical Science & Co...
ย 
Using Graph Analysis and Fraud Detection in the Fintech Industry
Using Graph Analysis and Fraud Detection in the Fintech IndustryUsing Graph Analysis and Fraud Detection in the Fintech Industry
Using Graph Analysis and Fraud Detection in the Fintech Industry
ย 
Using Graph Analysis and Fraud Detection in the Fintech Industry
Using Graph Analysis and Fraud Detection in the Fintech IndustryUsing Graph Analysis and Fraud Detection in the Fintech Industry
Using Graph Analysis and Fraud Detection in the Fintech Industry
ย 
Kx for wine tasting
Kx for wine tastingKx for wine tasting
Kx for wine tasting
ย 
IBANK - Big data www.ibank.uk.com 07474222079
IBANK - Big data www.ibank.uk.com 07474222079IBANK - Big data www.ibank.uk.com 07474222079
IBANK - Big data www.ibank.uk.com 07474222079
ย 
Dev Games!
Dev Games!Dev Games!
Dev Games!
ย 
Explainability for Learning to Rank
Explainability for Learning to RankExplainability for Learning to Rank
Explainability for Learning to Rank
ย 
Sean Kandel - Data profiling: Assessing the overall content and quality of a ...
Sean Kandel - Data profiling: Assessing the overall content and quality of a ...Sean Kandel - Data profiling: Assessing the overall content and quality of a ...
Sean Kandel - Data profiling: Assessing the overall content and quality of a ...
ย 

Mehr von aiclub_slides

Linear regression middleschool
Linear regression middleschoolLinear regression middleschool
Linear regression middleschoolaiclub_slides
ย 
Pa2 project template
Pa2 project templatePa2 project template
Pa2 project templateaiclub_slides
ย 
Knn intro advanced_middleschool
Knn intro advanced_middleschoolKnn intro advanced_middleschool
Knn intro advanced_middleschoolaiclub_slides
ย 
M1 regression metrics_middleschool
M1 regression metrics_middleschoolM1 regression metrics_middleschool
M1 regression metrics_middleschoolaiclub_slides
ย 
Pa1 json requests
Pa1 json requestsPa1 json requests
Pa1 json requestsaiclub_slides
ย 
Mnist images
Mnist imagesMnist images
Mnist imagesaiclub_slides
ย 
Mnist images
Mnist imagesMnist images
Mnist imagesaiclub_slides
ย 
Ai in real life face detection
Ai in real life   face detectionAi in real life   face detection
Ai in real life face detectionaiclub_slides
ย 
Res net high level intro
Res net high level introRes net high level intro
Res net high level introaiclub_slides
ย 
Neural networks and flattened images
Neural networks and flattened imagesNeural networks and flattened images
Neural networks and flattened imagesaiclub_slides
ย 
What is a_neural_network
What is a_neural_networkWhat is a_neural_network
What is a_neural_networkaiclub_slides
ย 
How neural networks learn part iii
How neural networks learn part iiiHow neural networks learn part iii
How neural networks learn part iiiaiclub_slides
ย 
Introduction to deep learning image classification
Introduction to deep learning   image classificationIntroduction to deep learning   image classification
Introduction to deep learning image classificationaiclub_slides
ย 
Accuracy middleschool
Accuracy middleschoolAccuracy middleschool
Accuracy middleschoolaiclub_slides
ย 
Introduction to classification_middleschool
Introduction to classification_middleschoolIntroduction to classification_middleschool
Introduction to classification_middleschoolaiclub_slides
ย 
Introduction to the cloud
Introduction to the cloudIntroduction to the cloud
Introduction to the cloudaiclub_slides
ย 
Basics of data
Basics of dataBasics of data
Basics of dataaiclub_slides
ย 
Ai lifecycle and navigator
Ai lifecycle and navigatorAi lifecycle and navigator
Ai lifecycle and navigatoraiclub_slides
ย 

Mehr von aiclub_slides (20)

Linear regression middleschool
Linear regression middleschoolLinear regression middleschool
Linear regression middleschool
ย 
Pa2 project template
Pa2 project templatePa2 project template
Pa2 project template
ย 
Knn intro advanced_middleschool
Knn intro advanced_middleschoolKnn intro advanced_middleschool
Knn intro advanced_middleschool
ย 
M1 regression metrics_middleschool
M1 regression metrics_middleschoolM1 regression metrics_middleschool
M1 regression metrics_middleschool
ย 
Pa1 json requests
Pa1 json requestsPa1 json requests
Pa1 json requests
ย 
Mnist images
Mnist imagesMnist images
Mnist images
ย 
Mnist images
Mnist imagesMnist images
Mnist images
ย 
Ai in real life face detection
Ai in real life   face detectionAi in real life   face detection
Ai in real life face detection
ย 
Cnn
CnnCnn
Cnn
ย 
Res net high level intro
Res net high level introRes net high level intro
Res net high level intro
ย 
Neural networks and flattened images
Neural networks and flattened imagesNeural networks and flattened images
Neural networks and flattened images
ย 
What is a_neural_network
What is a_neural_networkWhat is a_neural_network
What is a_neural_network
ย 
How neural networks learn part iii
How neural networks learn part iiiHow neural networks learn part iii
How neural networks learn part iii
ย 
Introduction to deep learning image classification
Introduction to deep learning   image classificationIntroduction to deep learning   image classification
Introduction to deep learning image classification
ย 
Accuracy middleschool
Accuracy middleschoolAccuracy middleschool
Accuracy middleschool
ย 
Introduction to classification_middleschool
Introduction to classification_middleschoolIntroduction to classification_middleschool
Introduction to classification_middleschool
ย 
Introduction to the cloud
Introduction to the cloudIntroduction to the cloud
Introduction to the cloud
ย 
Basics of data
Basics of dataBasics of data
Basics of data
ย 
Ai basics
Ai basicsAi basics
Ai basics
ย 
Ai lifecycle and navigator
Ai lifecycle and navigatorAi lifecycle and navigator
Ai lifecycle and navigator
ย 

Kรผrzlich hochgeladen

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
ย 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
ย 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
ย 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
ย 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
ย 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
ย 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
ย 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 ๐Ÿ’ž Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 ๐Ÿ’ž Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 ๐Ÿ’ž Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 ๐Ÿ’ž Full Nigh...Pooja Nehwal
ย 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
ย 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
ย 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
ย 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
ย 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
ย 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
ย 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
ย 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
ย 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
ย 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
ย 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
ย 

Kรผrzlich hochgeladen (20)

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
ย 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
ย 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
ย 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
ย 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
ย 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
ย 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
ย 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 ๐Ÿ’ž Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 ๐Ÿ’ž Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 ๐Ÿ’ž Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 ๐Ÿ’ž Full Nigh...
ย 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
ย 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
ย 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
ย 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
ย 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
ย 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
ย 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
ย 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
ย 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
ย 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
ย 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
ย 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
ย 

Pa2 session 5

  • 1. Python with AI โ€“ 2 Session 5
  • 2. Session recap Session Number What is covered 1 Python basics โ€“ recap 2 pandas dataframes and histograms 3 Bar charts โ€“ REST API 4 REST API and Precision Recall 5 Scatter plots and ROC curve 6 ROC curve and line plots 7 Model boundary visualization 8 Final Projects
  • 3. Appointment Planning dataset - kaggle โ€ข Plot a histogram of the label column `No-show` โ€ข What do you observe?
  • 4. How do you overcome the skew problem? โ€ข Resample the data to have equal frequency for the categories โ€ข https://repl.it/@AIClubAcademy/appointmentData#main.py
  • 5. Scatter plots (Classification) โ€ข We will analyze the titanic dataset: https://www.kaggle.com/c/titanic/data
  • 6. Scatter Plots โ€ข Libraries: matplotlib, seaborn
  • 7. Scatter Plots โ€“ continuous variables โ€ข Libraries: matplotlib
  • 8. Scatter Plots โ€“ continuous variables โ€ข Libraries: matplotlib
  • 9. Scatter Plots โ€“ continuous variables โ€ข Libraries: matplotlib
  • 10. Scatter Plots โ€“ categorical variables Both variables are categories. Create a matrix that shows the number of occurrences in each combination
  • 11. Scatter Plots โ€“ categorical variables Both variables are categories. Create a matrix that shows the number of occurrences in each combination Sex/Pclass Male Female 1 2 3
  • 12. Scatter Plots โ€“ categorical and continuous
  • 13. Scatter plots - Regression โ€ข Car prices dataset: https://www.kaggle.com/CooperUnion/cardataset
  • 14. Project Data Analysis โ€ข Distribution of the prediction variable โ€ข Scatter plots of the data
  • 15. Github โ€ข Please create an account at github: https://github.com/
  • 16. Model - analysis โ€ข Confusion Matrix โ€ข Precision โ€ข Recall ๐‘ƒ๐‘Ÿ๐‘’๐‘๐‘–๐‘ ๐‘–๐‘œ๐‘› = ๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘  ๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘  + ๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘–๐‘ฃ๐‘’๐‘  ๐‘…๐‘’๐‘๐‘Ž๐‘™๐‘™ = ๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘  ๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘  + ๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘๐‘’๐‘”๐‘Ž๐‘ก๐‘–๐‘ฃ๐‘’๐‘ 
  • 17. Model - analysis โ€ข Confusion Matrix โ€ข Precision โ€ข Recall โ€ข False Positive Rate ๐‘ƒ๐‘Ÿ๐‘’๐‘๐‘–๐‘ ๐‘–๐‘œ๐‘› = ๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘  ๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘  + ๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘–๐‘ฃ๐‘’๐‘  ๐‘…๐‘’๐‘๐‘Ž๐‘™๐‘™ = ๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘  ๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘  + ๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘๐‘’๐‘”๐‘Ž๐‘ก๐‘–๐‘ฃ๐‘’๐‘  ๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘๐‘œ๐‘ ๐‘–๐‘ก๐‘–๐‘ฃ๐‘’ ๐‘Ÿ๐‘Ž๐‘ก๐‘’ = ๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘–๐‘ฃ๐‘’ ๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘–๐‘ฃ๐‘’ + ๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘๐‘’๐‘”๐‘Ž๐‘ก๐‘–๐‘ฃ๐‘’
  • 18. Model - analysis โ€ข Confusion Matrix โ€ข Precision โ€ข Recall โ€ข False Positive Rate โ€ข True positive rate = Recall = Sensitivity ๐‘ƒ๐‘Ÿ๐‘’๐‘๐‘–๐‘ ๐‘–๐‘œ๐‘› = ๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘  ๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘  + ๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘–๐‘ฃ๐‘’๐‘  ๐‘…๐‘’๐‘๐‘Ž๐‘™๐‘™ = ๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘  ๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘ฃ๐‘’๐‘  + ๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘๐‘’๐‘”๐‘Ž๐‘ก๐‘–๐‘ฃ๐‘’๐‘  ๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘๐‘œ๐‘ ๐‘–๐‘ก๐‘–๐‘ฃ๐‘’ ๐‘Ÿ๐‘Ž๐‘ก๐‘’ = ๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘–๐‘ฃ๐‘’ ๐น๐‘Ž๐‘™๐‘ ๐‘’ ๐‘ƒ๐‘œ๐‘ ๐‘–๐‘ก๐‘–๐‘ฃ๐‘’ + ๐‘‡๐‘Ÿ๐‘ข๐‘’ ๐‘๐‘’๐‘”๐‘Ž๐‘ก๐‘–๐‘ฃ๐‘’