Model Prediction and Evaluation

GeeksforGeeks · Beginner ·🚀 Entrepreneurship & Startups ·1y ago
Skills: ML Pipelines60%

Key Takeaways

Model prediction and evaluation using various metrics

Full Transcript

hello everyone I hope you all are doing well this site priia Bia and in this video I'm very much excited to share with you the results let's see uh we have done so much effort in order to train our model in order to do the Eda right so let's see how much uh accuracy we're getting what kind of predictions our model is giving now and whether it is worth it or not right or we need to improvise our model again see what happened is usually when the model doesn't perform well when I'm saying not perform well maybe the number of evaluation metric is quite uh less less than 50% or 60% usually the score of 80 70 depending upon what kind of problem we are solving because it's a healthcare data maybe you can consider that it's a it's a very sensitive data and we need to handle it very cautiously although I have told you there are so many things which we can do on top of improvisation part as well even we can change this model to other classification models as well but as of now is we are limiting our discussion to logistic uh regression so we will apply this only and with the help of which we will try to understand what kind of results we are getting here so without wasting any time let's start our journey of model uh I would say predictions right let's get started so what we can do we can take a variable name Yore predictions and here we can say our model name is classification dot predict is the function name which help us to do the predictions and here we will be having xcore test uh once it is done let's try to print what kind of predictions we will be able to get here right so we're getting few zeros few ones okay okay because we're dealing with the classification problem so either the value will be zero or one so it makes sense maybe let's try to see the accuracy now for that what you can do is you have this escalar metrix again already there you can just import this accuracy score and you can directly see that how much accuracy your model is throwing so let's do one thing maybe you can just directly import this so let's do the model evaluation a bit because with these predictions I can't tell ke whether these things are great or not until or unless I don't have any mathematical number to justify so let's see what we can do is we can just uh import this accuracy underscore score so what we can do is we can just print this so in this we have two parameters first parameter is the actual value truth value which is in my case Yore test another one is the predicted value which which in my case is stored in Yore predictions so I can just mention this and let's see what is the score we will be able to achieve boom so here you can see we have almost 74.7% accuracy given by this model now maybe in future I'll try to take the similar kind of a data and we'll try to apply some different algorithms once you will learn that maybe tree based techniques might work better here uh which might give us a better result as well as I might think of hyper parameter optimization a which will help me to you know optimize this result and will help me to improve this number maybe to 80% at least right maybe you want to see the classification report completely do you remember the confusion metrics that we have learned so let's say you want to see completely that thing so what you can do is we have a again classification report uh metric as well so you can just import that as well maybe you want to see you want to name your target names as uh non diabetic class is your first first class that you have which is class zero and second class is a diabetic class which you want to report and then maybe what you can do is you can just print so this number so what will happen you can just try to apply your Yore test and your Yore predictions will give the predicted values and this is your target underscore names let's see the classification report how will it looks like so you can see in my case the non-diabetic Precision part is 85% recall is 76 F1 score is 80% support is 159 similarly you can see for diabetic class how much values are there specifically whenever we are talking about this Healthcare domain uh because we are dealing with today the healthare based project right Healthcare domain uh recall is a very very important metric recall is very important metric why is that so because in recall uh we usually focus on on decreasing the false negative value and false negative error is something which we always want to reduce in the healthare domain I have already explained this concept I believe in the recall Precision understanding so I hope you all all are aware about that if not please watch those videos you will be able to get the understanding why I'm saying so because when I'm saying false negative it means that actually so your prediction is saying the value is negative right for example let's say a person is having a Cancer and your model is saying person is not having a cancer how dangerous the situation is you can understand right ke person is having some disease XYZ and your model is saying he is not having disease it's like it's in a danger of Health right so that's why recall is something which is very very important parameter in healthcare domain at least this number I always want to improve Precision is not that much important as comparable to recall specifically for the healthcare based data I hope it makes sense right so with this we will be having the accuracy with us we will be having a complete classification Report with us super amazing now we have a model ready right classification model in the upcoming video I will show you how we can save this file because usually what happen you will deal with a huge amount of data and as I told you when you're are doing a training it's not like within seconds you will get the training data training uh uh number with you right it usually takes too much amount of time too much resources so the best practice will will be when you work with the real time uh data as well to save your model so that in future if you want to use the that model to do the predictions you can directly open that file and use that for the prediction per se so I will show you how it will be done in the Future Part of the video so please stay tuned and I hope that you really enjoyed this complete pipeline uh please share your feedback right with this bye-bye everyone I'll see you all very soon in the upcoming video

Original Description

Explore Premium LIVE and Online Courses : https://practice.geeksforgeeks.org/courses/ Follow us for more fun, knowledge and resources: 📱 Download GeeksforGeeks' Official App: https://geeksforgeeksapp.page.link/gfg-app 💬 Twitter- https://twitter.com/geeksforgeeks 🧑‍💼 LinkedIn- https://www.linkedin.com/company/geeksforgeeks 📷 Instagram- https://www.instagram.com/geeks_for_geeks/?hl=en 💌 Telegram- https://t.me/s/geeksforgeeks_official Also, Subscribe if you haven't already! :) #GeeksforGeeks #Learntocode #GfG
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from GeeksforGeeks · GeeksforGeeks · 0 of 60

← Previous Next →
1 How I got into Walmart | Shailesh Sharma
How I got into Walmart | Shailesh Sharma
GeeksforGeeks
2 Upgrade yourself In 29 Days | GeeksforGeeks
Upgrade yourself In 29 Days | GeeksforGeeks
GeeksforGeeks
3 Learn AWS Fundamentals For Free
Learn AWS Fundamentals For Free
GeeksforGeeks
4 Conversation With Young Achievers | Meet the winners of Bi-Wizard Coding Contest | GeeksforGeeks
Conversation With Young Achievers | Meet the winners of Bi-Wizard Coding Contest | GeeksforGeeks
GeeksforGeeks
5 Meet The Winners Of Bi-Wizard Coding Contests | GeeksforGeeks
Meet The Winners Of Bi-Wizard Coding Contests | GeeksforGeeks
GeeksforGeeks
6 Interview Prep Strategies | PayPal
Interview Prep Strategies | PayPal
GeeksforGeeks
7 OLX Interview Preparation Strategies | Hukam Singh
OLX Interview Preparation Strategies | Hukam Singh
GeeksforGeeks
8 Meet Some More Winners Of Bi-Wizard Coding Contests | GeeksforGeeks
Meet Some More Winners Of Bi-Wizard Coding Contests | GeeksforGeeks
GeeksforGeeks
9 Live Mock DSA
Live Mock DSA
GeeksforGeeks
10 Microsoft Azure For Absolute Beginners
Microsoft Azure For Absolute Beginners
GeeksforGeeks
11 Python for Data Science | Data Science Master Bootcamp | Arpit Jain
Python for Data Science | Data Science Master Bootcamp | Arpit Jain
GeeksforGeeks
12 Getting Started with Data Analysis | Data Science Master Bootcamp | Ashish Jangra
Getting Started with Data Analysis | Data Science Master Bootcamp | Ashish Jangra
GeeksforGeeks
13 How to prepare theory subjects for SDE interviews | Geeks Summer Carnival 2022
How to prepare theory subjects for SDE interviews | Geeks Summer Carnival 2022
GeeksforGeeks
14 Get Your Tickets To The Geeks Summer Carnival | GeeksforGeeks
Get Your Tickets To The Geeks Summer Carnival | GeeksforGeeks
GeeksforGeeks
15 TED Talk Data Analysis Project | Data Science Master Bootcamp | Ashish Jangra
TED Talk Data Analysis Project | Data Science Master Bootcamp | Ashish Jangra
GeeksforGeeks
16 How I Secured AIR 9 in GATE'22 |  Tushar
How I Secured AIR 9 in GATE'22 | Tushar
GeeksforGeeks
17 Learn Java Backend Development | Geeks Summer Carnival | GeeksforGeeks
Learn Java Backend Development | Geeks Summer Carnival | GeeksforGeeks
GeeksforGeeks
18 How to Recognize which Data Structure to use in a question | Geeks Summer Carnival | GeeksforGeeks
How to Recognize which Data Structure to use in a question | Geeks Summer Carnival | GeeksforGeeks
GeeksforGeeks
19 Learn Data Structures and Algorithms | GeeksforGeeks
Learn Data Structures and Algorithms | GeeksforGeeks
GeeksforGeeks
20 Interview experience at Flipkart | GeeksforGeeks
Interview experience at Flipkart | GeeksforGeeks
GeeksforGeeks
21 Lets Prepare for GATE'23 the Right Way | Sakshi Singhal | GeekSummerCarnival
Lets Prepare for GATE'23 the Right Way | Sakshi Singhal | GeekSummerCarnival
GeeksforGeeks
22 Highest Paying Jobs in 2022 | Ishan Sharma | Geeks Summer Carnival 2022 | GeeksforGeeks
Highest Paying Jobs in 2022 | Ishan Sharma | Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
23 Geeks Summer Carnival 2022 | 5th April- 11th April | GeeksforGeeks
Geeks Summer Carnival 2022 | 5th April- 11th April | GeeksforGeeks
GeeksforGeeks
24 Preparing for SDE interviews | Soham Mukherjee | Geeks Summer Carnival 2022 | GeeksforGeeks
Preparing for SDE interviews | Soham Mukherjee | Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
25 Full Stack Development with React & Node | Utkarsh Malik | Geeks Summer Carnival | GeeksforGeeks
Full Stack Development with React & Node | Utkarsh Malik | Geeks Summer Carnival | GeeksforGeeks
GeeksforGeeks
26 Introduction to Open Source and Roadmap to GSOC 2022 | Geeks Summer Carnival 2022 | GeeksforGeeks
Introduction to Open Source and Roadmap to GSOC 2022 | Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
27 Web Scraping in Action | Geeks Summer Carnival 2022 | GeeksforGeeks
Web Scraping in Action | Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
28 Getting Hired at BITCS via GfG Job Portal | Get Hired With GeeksforGeeks
Getting Hired at BITCS via GfG Job Portal | Get Hired With GeeksforGeeks
GeeksforGeeks
29 How to build a faster landing Page | Geeks Summer Carnival 2022 | GeeksforGeeks
How to build a faster landing Page | Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
30 Geeks Summer Carnival | 5th To 11th April, 2022 | GeeksforGeeks
Geeks Summer Carnival | 5th To 11th April, 2022 | GeeksforGeeks
GeeksforGeeks
31 How to get ideas for Startup | Geeks Summer Carnival 2022 | GeeksforGeeks
How to get ideas for Startup | Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
32 Journey from Tier 3 to JusPay | GeeksforGeeks
Journey from Tier 3 to JusPay | GeeksforGeeks
GeeksforGeeks
33 Geeks Summer Carnival 2022 | GeeksforGeeks
Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
34 Dispelling Myths and Pre conceptions of Programming Languages
Dispelling Myths and Pre conceptions of Programming Languages
GeeksforGeeks
35 Must Do System Design Questions
Must Do System Design Questions
GeeksforGeeks
36 Understanding Sorting Techniques in an hour | Keerti Purswani | Geeks Summer Carnival
Understanding Sorting Techniques in an hour | Keerti Purswani | Geeks Summer Carnival
GeeksforGeeks
37 Get Hired at NEC | Job-A-Thon 8
Get Hired at NEC | Job-A-Thon 8
GeeksforGeeks
38 Journey from Tier 3 college to Microsoft | GeeksforGeeks
Journey from Tier 3 college to Microsoft | GeeksforGeeks
GeeksforGeeks
39 Get Hired with GeeksforGeeks at SuperK | Job A Thon 8
Get Hired with GeeksforGeeks at SuperK | Job A Thon 8
GeeksforGeeks
40 GeeksforGeeks: Redesigned
GeeksforGeeks: Redesigned
GeeksforGeeks
41 From Tier 3 to cracking multiple interviews | GeeksforGeeks
From Tier 3 to cracking multiple interviews | GeeksforGeeks
GeeksforGeeks
42 Live Mock DSA
Live Mock DSA
GeeksforGeeks
43 Youtube Data Analysis | Ashish Jangra | GeeksforGeeks
Youtube Data Analysis | Ashish Jangra | GeeksforGeeks
GeeksforGeeks
44 DSA Self-Paced Course Preview | Sandeep Jain | GeeksforGeeks
DSA Self-Paced Course Preview | Sandeep Jain | GeeksforGeeks
GeeksforGeeks
45 GATE Live Classes | Prepare for GATE CS 2023 | GeeksforGeeks
GATE Live Classes | Prepare for GATE CS 2023 | GeeksforGeeks
GeeksforGeeks
46 Journey from JIIT to Adobe
Journey from JIIT to Adobe
GeeksforGeeks
47 Life Is Unfair Ft. Shonty badmash | LIVE Discord Session | A GeeksforGeeks Exclusive
Life Is Unfair Ft. Shonty badmash | LIVE Discord Session | A GeeksforGeeks Exclusive
GeeksforGeeks
48 Interview Experience at Google | Tech Dose
Interview Experience at Google | Tech Dose
GeeksforGeeks
49 Live Mock DSA
Live Mock DSA
GeeksforGeeks
50 Interview Experience @ Amazon | GeeksforGeeks
Interview Experience @ Amazon | GeeksforGeeks
GeeksforGeeks
51 My journey through the tech world from India to US | Vidushi | GeeksforGeeks
My journey through the tech world from India to US | Vidushi | GeeksforGeeks
GeeksforGeeks
52 Complete Interview Preparation Course | GeeksforGeeks
Complete Interview Preparation Course | GeeksforGeeks
GeeksforGeeks
53 Live Mock DSA
Live Mock DSA
GeeksforGeeks
54 Getting Hired at FiftyFive Technologies | Job-a-thon 9.0
Getting Hired at FiftyFive Technologies | Job-a-thon 9.0
GeeksforGeeks
55 GFG Karlo, Ho Jayega | GeeksforGeeks ft. Khaleel Ahmed
GFG Karlo, Ho Jayega | GeeksforGeeks ft. Khaleel Ahmed
GeeksforGeeks
56 How I got job offers from 2 big companies : Arcesium & Microsoft | GeeksforGeeks
How I got job offers from 2 big companies : Arcesium & Microsoft | GeeksforGeeks
GeeksforGeeks
57 LINUX for Beginners | GFG x Itversity
LINUX for Beginners | GFG x Itversity
GeeksforGeeks
58 My interview experience at Walmart | GeeksforGeeks
My interview experience at Walmart | GeeksforGeeks
GeeksforGeeks
59 Get Hired at Speckyfox
Get Hired at Speckyfox
GeeksforGeeks
60 Live Mock DSA
Live Mock DSA
GeeksforGeeks

Related Reads

Up next
Watch this before applying for jobs as a developer.
Tech With Tim
Watch →