Check our Deep Learning Course (in PyTorch) with Latest, Industry Relevant Content: tinyurl.com/4p9vmmds Check out our premium machine learning course with 2 Industry projects: codebasics.io/courses/machine-learning-for-data-science-beginners-to-advanced
@MrMadmaggot2 жыл бұрын
Dude I ran a similar churn model with three outcomes. When I run the dataset without oversample the NN gives me a nice accuracy. When I run the dataset WITH oversample, somehow the NN gives me a very bad accuracy. WHY?
@humanandlifefacts9217 Жыл бұрын
the dataset has already column if a customer churned or not. Then what are we really predicting ?
@amitmishra5474 Жыл бұрын
Hi Sir! at 29:04 why are you calling first layer as ''Hidden layer"? I think first layer should be Input layer. I am confused.
@codebasics4 жыл бұрын
Clarification: This video was just to demonstrate how to build neural network for structured dataset like customer churn. However there is an imbalance in this dataset (number of samples with churn=Yes are much less than churn=No), I will add a new video in this series showing how to handle this imbalance. That will improve the f1 score.
@darullshifa48704 жыл бұрын
sir i want to do my MS thesis on Churn prediction. is it possible to use this code and make it???
@omkarg014 жыл бұрын
At 11:54 you said green mean customer staying and red means customer leaving, and at 13:15 you said opposite of that, plz clear the statement. BTW your videos are helping so much!
@symmercool76724 жыл бұрын
Hello May be I missed it, but what's your name please? I had to run all your videos at 2x speed else I would have slept or got distracted...hahaha I have been following all your videos and they are all extremely helpful. Thanks for your efforts :)
@programmingwithraahim Жыл бұрын
23:34 for those people who are getting dummy variables to be True or False, just supply (dtype=int) in the get_dummies function.
@bhumeshpanchal490410 ай бұрын
thank you so much. It took my whole day to understand.
@programmingwithraahim10 ай бұрын
No problem bro@@bhumeshpanchal4904
@tarangrathod2559 ай бұрын
thank you so much
@luciofernandez3501Ай бұрын
Perfect, thank you!
@066-pritamjena310 ай бұрын
14:11 sir can you explain about that blood_sugar_men and blood_sugar_women
@AlonAvramson3 жыл бұрын
You have such an amazing talent to simplify complex issues and explain them so they look simple. It comes with a lot of hard work and it is very very much appreciated .
@Piyush-yp2po5 ай бұрын
82% accuracy for exercise dataset, first remove unnecessary cols, replace col values, scale col values then train test split, then building neural network, atlast classification report, heat map and histogram plotting, thanks sir!
@fadilyassin45972 жыл бұрын
cleaning the data is very very essential i any project what you did in this project is very good hope you do more advanced video on preparing the data excellent work
@stevenlevittt3 жыл бұрын
Learnt a lot on this video. My focus mainly was on cleaning, and the part from 27:58
@mrminus85906 ай бұрын
You have a good sense of humour I like it
@imranh27743 жыл бұрын
Churn=Yes should be red and Churn=No should be green, however it is shown the other way around
@muditmathur4652 жыл бұрын
Correct, proper EDA shall be done for Stakeholders to be able to understand the problem better
@tylerpoore14872 жыл бұрын
Glad I wasn't the only one who noticed this.
@parthverma70892 жыл бұрын
@@tylerpoore1487 nice flex
@lanreuzamere4994 Жыл бұрын
@Imran H Well I think colors are compared with "Traffic Lights": Green=Go/Leave and Red=Waiting/Stay! So if you are leaving/moving(Churn=Yes) it's Green-Lights/Go and if you are Staying(Churn=No) it's Red-Lights/Wait/Stay!
@mrIndia50011 ай бұрын
@@lanreuzamere4994 idea is good, but it would be so dumb to show customers being loyal in red flag. haha
@manishakanojia91913 ай бұрын
I really needed ANN model building video on classification model for structured dataset. Thank you for the help :)
@sauravthakur29153 жыл бұрын
Instead of using threshold value for making yp 0 and 1 we can use : yp = model.predict_classes(X_test) it will give up as 0 and 1 value.
@panther_.gaming Жыл бұрын
wow thats some new info to me. Thanks bud. i was using round(yp,0) as it will convert all
@ChPradeepKumar10 ай бұрын
you have good sense of humor😂
@AjinkyaBhushan9 ай бұрын
18:30 the df1.replace('No internet service', 'No', inplace=True) is not working Can anyone suggest any help?
@AjinkyaBhushan9 ай бұрын
I solved it here is the code: def print_unique_col_values(df1): for col in df1.columns: if df1[col].dtype == 'object': df1.loc[:, col].replace({'No internet service': 'No', 'No phone service' : 'No'}, inplace=True) print(f'{col} : {df1[col].unique()}')
@fahadreda30604 жыл бұрын
Your videos are getting better and better, Thanks man , love your videos
@ajaythapar6169 Жыл бұрын
Excellent order of contents delivery in a possible simple way. Made each session interesting and linked with the previous sessions. Thank you so much for your efforts.
@lanreuzamere4994 Жыл бұрын
@Imran H : Well I think colors are compared with "Traffic Lights": Green=Go/Leave and Red=Waiting/Stay! So if you are leaving/moving(Churn=Yes) it's Green-Lights/Go and if you are Staying(Churn=No) it's Red-Lights/Wait/Stay!
@KanaparthiLakshmikanth2 ай бұрын
Hi @25:51 i think we need to scale the features after train test split to avoid data leakage.
@devanshsrivastava55894 жыл бұрын
Thanks for teaching such extensively all the projects and ML methods
@Breaking_Bold Жыл бұрын
Excellent video on business use case hands-on lab !!!!
@rafibasha41452 жыл бұрын
14:23,Churn=No for 120 so they are not leaving actually and from the graph its clear people are not churning due to high monthly charges
@encibimohamedhamza71822 жыл бұрын
Exactly, I think it was a misinterpretation
@shubhamsahoo3313 жыл бұрын
Thank you so much for this great tutorial, and your endless effort to share your knowledge.
@codebasics3 жыл бұрын
☺️🙏
@bratsummer19804 жыл бұрын
Sir you are great Your humor is also good for refresher .
Thank you ! I had a hard time struggling with the coding things, but you make learning ML or DL so easy and fun!
@Codingiisgreat3 жыл бұрын
at 29:35 the input_shape is (26,) that is 26 columns but what about 5625 rows ??? I'm finding input shape for this dataset quite different than the Handwriiten Digits Classification
@otsogileonalepelo96103 жыл бұрын
This is the same observation I made as well, do you understand why?
@snehduggal30875 ай бұрын
I have a question. I remember in one of the machine learning we dropped one column for the dummy variable trap. Why didn't we do it here?
@rishavbhattacharjee71824 жыл бұрын
Thanks for giving the dataset sir. Really helpful for practise.😁
@codebasics4 жыл бұрын
Yup, practice is very important
@simplydesigncad67772 жыл бұрын
awsome tutorial . thank you for taching useful methods
@shrutidas34077 ай бұрын
Thanks a lot sir fo making this topic sooo easy to understand🤗
@vivekbansal19773 жыл бұрын
Yes Its Informative, Explained each and everything, Thanks Bro!
@codebasics3 жыл бұрын
Glad it was helpful!
@ahmedosman10202 жыл бұрын
This was so good! Keep it coming!
@NguyenNhan-yg4cb4 жыл бұрын
In 31:35, class y have 2 labels 1 and 0 ( mean Yes or No ), then why your final dense 1, that must be 2 right ?
@piyushpathak19964 жыл бұрын
Hello sir, First of all, love your content and teaching style. Thank you. Just wanted to clear a small doubt. Do we need to worry about the " Dummy Variable Trap" in deep learning models too? I noticed, we have not dropped any of the generated dummies after OneHot Encoding.
@bigdatamanagemententerpris85033 жыл бұрын
It is always good to avoid dummy variable trap.
@khanaftab38523 жыл бұрын
You are a great teacher thanku
@codebasics3 жыл бұрын
I am happy this was helpful to you.
@MCAAlexKumar2 жыл бұрын
Do a project to predict what type or what subject video will give you more views and engagement .
@annabiju71123 жыл бұрын
This was very helpful. Thanks a lot!
@ajaykushwaha42333 жыл бұрын
After long search I found ANN for classification problem. Thank you for such awesome video. Sir I have a question: in ML classification we have 5-6 also for solving classification problem. Do we also have similar algo in ANN for solving multi class or binary classification problem ?
@itsmeatrin2 жыл бұрын
27:23 O_O dude forgot it's not time for his evil mastermind to come out LMAO
@HelloNewMe19963 жыл бұрын
I am so confused in 14:23 , you said that the customer leaving more based on the highest monthly charges. but the red color is the customer who retained. They are not leaving.
@encibimohamedhamza71822 жыл бұрын
Exactly, I think it was a misinterpretation
@Blessing-o4c11 ай бұрын
i am forever grateful to you and I continuous which you success, I love that for a every questions I want to ask you provide answer like why use replace instead of one hot encode? thanx
@mirkhalil-c4t4 ай бұрын
Exercise done with 86.2 testing accuracy
@luciofernandez3501Ай бұрын
Thank you for this excellent video, one question: why I get False or True when applying the get_dummies function instead of ones or zeros ?
@minakshisontake35852 жыл бұрын
very good knowledge
@thecomputerpilot3 ай бұрын
GREAT video
@rajatlingwal48 Жыл бұрын
Thank you for making the video. Sir, I have one doubt regarding one hot encoding. When you made dummy variables and you got 3 new columns, you used all 3 new dummy colums in your model. In such scenario there would be chances of dummy variables trap or multicolliniarity. So to avoid that we always remove one colums from our dummy variables. Could you please make a separate video on it. Thank you.
@codebasics Жыл бұрын
Hey yes. You can remove that column. In one of my videos in ML playlist I have discussed this
@aaryamansingla94593 жыл бұрын
Quick doubt: When should the scaling be done? After train_test_split or before? In this video you did it before but I heard it can lead to data leakage problem. Thank you for the content
@aliffnabil55423 жыл бұрын
yes you should scale the data after the train test split to avoid data leakage from our test split into our training split
@theyk38173 жыл бұрын
That's your choice, but it'd be better if you scale the data set before splitting as you won't need to scale the test and validation dataset separately .
@work-dw2hl4 жыл бұрын
wonderful explanation
@codebasics4 жыл бұрын
Glad it was helpful!
@dheerajsoni95013 жыл бұрын
Great Video.. So easy to understand Thanks alot Sir. Also I would like to learn after the model is ready, how do I run this model on other dataset. Please share your knowlegde on who to use the model on other datasets of same type.
@jaysoni78123 жыл бұрын
Sir please make a video on hyper parameter tuning using keras tuner. i hardly missing your video bcz i didn't find perfect each and every component explanation at anywhere.
@adityahpatel3 жыл бұрын
what is keras tuner?
@Mer_Degan Жыл бұрын
That's a fantastic video. But, was there any specific reason you didn't remove one dummy variable when you used the hot-encoding method? (for preventing multicollinearity).
@sankalapajena46254 жыл бұрын
In monthly charge histogram,with a high monthly charge histogram shows that churn=no that means customers are not leaving right?but it's not true ..
@letsexplorewithzak36144 жыл бұрын
Your the best, when it comes to an explanation. Do you have any community where all AI, ML or deep learning talk happen?
@codebasics4 жыл бұрын
Yes I am going to launch a discord community. I will announce soon, stay tuned. I will be doing a live session with some big announcements
@nonsnona5322 жыл бұрын
sir, thank you for this video. I have a question, how can we predict the customer churn. I mean, I want to see a way that I can give the model some information about a specific customer, then the model should give its prediction about this specific customer either yes or no churn. I asked you this question because I see you that you stopped in your video after you get the recall results. I was waiting to see you insert customer's data and get the result from the model. Thanks
@yashdhansare3142 жыл бұрын
Sir, I think @11:55 you interpreted it wrongly, "Yes" means the "Churn=Yes", so customer has churned i.e. he/she leaved the company, but you said that Green(Yes) means customer is staying. So, the customer is not staying, it is actually leaving...
@encibimohamedhamza71822 жыл бұрын
Exactly, I think it was a misinterpretation
@jishanahmed2252 жыл бұрын
Nice video! By the way, scaling before the train-test split caused data leakage. How can we trust the predictions then?
@jishanahmed2252 жыл бұрын
@@HyperLinguist-AI U need to rely on explainable machine learning tools to get what you want.
@studyonline32362 жыл бұрын
at 12:39, churn_yes must be red and churn_no must be green. It is quite opposite and hence the conclusions drawn are wrong with respect to the colors. Therefore, 14:35 is wrong lol and the company is doing good I guess.
@Sachin-xj1oq9 ай бұрын
Hi, Wonderful lecture. If I want to use Genetic Algorithm for feature selection. How can i implement in this analysis?
@manikumar-vr3kp5 ай бұрын
there is a problem with churn visualization colour
@lol-uq4ly9 күн бұрын
sir if the standard deviation of a particular feature is too high what steps should be taken to fix this issue
@sandiproy330 Жыл бұрын
Thank you, sir. This was a fantastic video tutorial. Very clearly explained.
@ubannadan-ekeh77814 жыл бұрын
very good tutorial, thank you. please I am getting ValueError: Must pass 2-d input, when I try to run the confusion matrix heatmap
@Sarvesh.7574 жыл бұрын
use an additional bracket [ ] it will work nor
@tchintchie4 жыл бұрын
thank you for the great tutorial. however there´s one question (sorry if asked before): don´t we have to take into account the obvious class imbalance of the target variable?
@codebasics4 жыл бұрын
You are absolutely right that we didn't account for imbalance in the dataset. I will add a new video on how to tackle that.
@advertisemedia1509 Жыл бұрын
in my case i needed to do this change (y_predicted>0.5) from sklearn.metrics import confusion_matrix , classification_report print(classification_report(y_test,y_predicted>0.5))
@PP-tc1zp3 жыл бұрын
Hi, thank you for your courses Something different: I am tired recently I take moringa Do you know moringa and is it really healthy and safe?
@bratsummer19804 жыл бұрын
Sir do you have any video regarding svm for various inputs?? Or Ann for more than 3 inputs?? Actually I have both classification and non classification problem
@kmnm94634 жыл бұрын
Hi Sir, Can you please do a series on ML solutions for Anti-Money Laundering, Anomaly Detection , Market Manipulation etc. in Banking and Financial Services. I guess these are in much demand now and openings are also many. This would help a lot?. from Krish
@hardikvegad35084 жыл бұрын
8.42 how did you removed that warning message??
@shaikansarbasha41693 жыл бұрын
use this code you will not get any warnings import warnings warnings.filterwarnings('ignore')
@adhyanmaji26724 жыл бұрын
Sir please make a video on advanced house price regression from kaggle .
@gauravakotkar32222 жыл бұрын
Do we just build model in Random forest and ANN or we can predict value of target label by putting values of observation for which we do not know the target label. Like in Linear regression we get equation where can put value of Xs for corresponding coefficient????????
@techsavy56693 жыл бұрын
Using balanced dataset and some permutations on layers/neurons , i got ~91.3% accuracy. Is this optimal or do we have more scope here! Thanks.
@dasgupts102 жыл бұрын
Is feature engineering a precursor to ANN unlike other deep learning techniques.Here we are doing feature engineering first then applying ANN
@englishprimiereleague16772 жыл бұрын
Thanks for this wonderful video.How can I build an interface for this model
@imranuddin21532 жыл бұрын
Thank you for making such wonderful step by step tutorials. I have learned more from your tutorials than from my classes. I was wondering if you'd clarify a little confusion I have. We initially saw the data had more than 7000 instances. But the confusion matrix shows lot less than that number. Shouldn't the matrix show the result for all numbers?
@LamNguyen-jp5vh2 жыл бұрын
This is because he did the test split for training and testing
@RaunakKumar-yr3zv2 жыл бұрын
confusion matrix shows only for X_test
@MohamedAli-hh3qm2 жыл бұрын
does this one model/dataset will suit for any type of company. I mean, This one dataset will help to predict churn for companies like bank, Telecom, Wireless Services, Food delivering services so on.
@manterou3 жыл бұрын
Hello ! What is a good approach for a database that has questions in the columns and in the rows the answers to those questions (multiple selection where the clients chose 1 answer from 4 options).
Is there a video where we can build a simple UI and deploy this project. It would good practice and making this end to end. A simple flask .api with a seirlized model. Does your channel have a video on this, thanks in advance
@codebasics2 жыл бұрын
yes I have done few end to end projects. In youtube search "codebasics data science projects" you will find few playlists where I covered building UI, deployment using both fastap and flask.
@digitalnomad21962 жыл бұрын
@@codebasics Thank you, I'll check those out. What do you think a good simple deployment for this project would consist of ?
@flaviobrienza6081 Жыл бұрын
I have a doubt: he performed the preprocessing on the entire dataset and split it into X_train and X_test. Isn't it incorrect? Shouldn't he call the X_test X_validation, since the test set must not be pre-processed with the training set.
@raunak34063 жыл бұрын
Hey you are using an ANN but what kind of ANN is it, like is it backpropagation, Delta, Kohonen. Which model is used here?
@JoEl-jx7dm Жыл бұрын
Hey sir, can i use this model to predict the Hw dataset?
@MaheshikaWeerasinghe3 жыл бұрын
Great tutorial ! One question though. Instead of one ot encoding, can't we use nominal scaled values as 1,2,3 for such attributes like Internet_Service?
@gautamprabhu32673 жыл бұрын
We prefer that when the categorical data is ordinal i.e it can be ranked. Otherwise, OHE is preferred
@MaheshikaWeerasinghe3 жыл бұрын
@@gautamprabhu3267 Thanks!
@ajaykushwaha42333 жыл бұрын
How to know the number of hidden layers need to be built and the number of neurons in each hidden layer ?
@pyclassy4 жыл бұрын
can you upload any regression problem using ANN on skewed data without removing skewness.how we will train ANN in such case?
@cikguhasnah14183 жыл бұрын
sir, i have train ann on my dataset and the done the preprocess stage. however, the accuracy of my ann model does not change during the epochs running. does i have problem with my dataset? tq
@shelidatta4885 Жыл бұрын
My yp values are very low as compared to your values and getting errors while creating confusion matrix.Please suggest changes.
@abhinavsingh-wl4yz3 жыл бұрын
What is the use of blood_sugar_men and blood_sugar_women
@rajuvarma-zk2zw4 жыл бұрын
I didn't get the point, why separately calculating precision and recall for class 0 and class1 , what is macro AVG and what is weighted average?I know generally precision and recall calculating for entire dataset . Why accuracy not considered?
@313yogesh4 жыл бұрын
Great tutorial!, can you make a video on stock price prediction using lstm?
@codebasics4 жыл бұрын
Yes I can
@emmanuelsamutumwa9686 ай бұрын
How can I use this model in my react web application that’s has a dashboard?
@dollysowmya78934 ай бұрын
I want to work on customer churn prediction but how to find the dataset for this project
@jongcheulkim72843 жыл бұрын
Thank you.
@yepnah35143 жыл бұрын
hi could you explain what y_test is? Is that the validation data? is x_test the training data? also, is y_pred the data in your prediction? Im trying to do this but with images. I have a folder of images (prediction folder) and I'm trying to print out the array with the results instead of images. right now i have it set so when i ran the prediction loop, images are loaded along with their 1 or 0. so I visually see if the result is accurate or not. I want to use arrays instead of images tho.
@humanandlifefacts9217 Жыл бұрын
the dataset has already column if a customer churned or not. Then what are we really predicting ?
@depeshkumarmohanty95224 жыл бұрын
sir can you plz interpret the output in business term to a layman person . You just stopped in confusion matrix
@codebasics4 жыл бұрын
Sure it is hard to add it in video but once you have built the model you can run it on current set of customers and find out who are going to leave most likely. And then focus on business strategy so that they don't leave (by giving them special discount, increasing engagement, providing better service etc) also this python notebook gives insights on due to which factors customer is leaving and again you can modify business strategy to reduce the churn rate
@hiteshsahoo9283 Жыл бұрын
At 18.32 The replace method is not working... Even printing the unique values there was no replacement What should be the approach to make that work??
@techspoc74424 жыл бұрын
Sir , Can you make one video on keras tuner ???
@amanrohilla66598 ай бұрын
what is the end result of this prediction like kya fayda hora hai??
@stevekim13573 жыл бұрын
I am new to ML, how do you create 'Churn'? I only know variable values.
@VibenPlay_Tawseeq2 жыл бұрын
Isn't this that when we use pd.get_dummies,we have to use drop_first=True,otherwise the model would be overfitted🧐