Customer churn prediction using ANN | Deep Learning Tutorial 18 (Tensorflow2.0, Keras & Python)

Поділитися
Вставка
  • Опубліковано 22 тра 2024
  • In this video we will build a customer churn prediction model using artificial neural network or ANN. Customer churn measures how and why are customers leaving the business. WE will use telecom customer churn dataset from kaggle (link below) and build a deep learning model for churn prediction. We will also understand precision,recalll and accuracy of this model by using confusion matrix and classification report
    #customerchurnprediction #customerchurn #customerchurnpredictionusingANN #ANN #deeplearningANN #deeplearningtutorial
    Do you want to learn technology from me? Check codebasics.io/?... for my affordable video courses.
    Code: github.com/codebasics/deep-le...
    Exercise: For exercise go at the end of above notebook. There is a link to kaggle dataset and exercise description
    Dataset: www.kaggle.com/blastchar/telc...
    Next video: • Precision, Recall, F1 ...
    Previous video: • GPU bench-marking with...
    Deep learning playlist: • Deep Learning With Ten...
    Machine learning playlist : • Machine Learning Tutor...
    #️⃣ Social Media #️⃣
    🔗 Discord: / discord
    📸 Dhaval's Personal Instagram: / dhavalsays
    📸 Instagram: / codebasicshub
    🔊 Facebook: / codebasicshub
    📝 Linkedin (Personal): / dhavalsays
    📝 Linkedin (Codebasics): / codebasics
    📱 Twitter: / codebasicshub
    🔗 Patreon: www.patreon.com/codebasics?fa...
    DISCLAIMER: All opinions expressed in this video are of my own and not that of my employers'.

КОМЕНТАРІ • 202

  • @codebasics
    @codebasics  2 роки тому +7

    Do you want to learn technology from me? Check codebasics.io/ for my affordable video courses.

    • @MrMadmaggot
      @MrMadmaggot Рік тому

      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
      @humanandlifefacts9217 Рік тому

      the dataset has already column if a customer churned or not. Then what are we really predicting ?

    • @amitmishra5474
      @amitmishra5474 9 місяців тому

      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.

  • @AlonAvramson
    @AlonAvramson 2 роки тому +12

    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 .

  • @codebasics
    @codebasics  3 роки тому +45

    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.

    • @darullshifa4870
      @darullshifa4870 3 роки тому +1

      sir i want to do my MS thesis on Churn prediction. is it possible to use this code and make it???

    • @omkarg01
      @omkarg01 3 роки тому +8

      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!

    • @symmercool7672
      @symmercool7672 3 роки тому +1

      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 :)

  • @ajaythapar6169
    @ajaythapar6169 9 місяців тому

    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.

  • @fahadreda3060
    @fahadreda3060 3 роки тому +1

    Your videos are getting better and better, Thanks man , love your videos

  • @devanshsrivastava5589
    @devanshsrivastava5589 3 роки тому

    Thanks for teaching such extensively all the projects and ML methods

  • @pei2273
    @pei2273 Рік тому

    Thank you ! I had a hard time struggling with the coding things, but you make learning ML or DL so easy and fun!

  • @Breaking_Bold
    @Breaking_Bold 8 місяців тому

    Excellent video on business use case hands-on lab !!!!

  • @fadilyassin4597
    @fadilyassin4597 Рік тому +1

    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

  • @stevenlevittt
    @stevenlevittt 2 роки тому

    Learnt a lot on this video. My focus mainly was on cleaning, and the part from 27:58

  • @ahmedosman1020
    @ahmedosman1020 2 роки тому

    This was so good! Keep it coming!

  • @shubhamsahoo331
    @shubhamsahoo331 2 роки тому +2

    Thank you so much for this great tutorial, and your endless effort to share your knowledge.

  • @annabiju7112
    @annabiju7112 2 роки тому

    This was very helpful. Thanks a lot!

  • @shrutidas3407
    @shrutidas3407 10 днів тому

    Thanks a lot sir fo making this topic sooo easy to understand🤗

  • @simplydesigncad6777
    @simplydesigncad6777 Рік тому

    awsome tutorial . thank you for taching useful methods

  • @vivekbansal1977
    @vivekbansal1977 2 роки тому

    Yes Its Informative, Explained each and everything, Thanks Bro!

  • @ajaykushwaha4233
    @ajaykushwaha4233 2 роки тому +1

    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 ?

  • @1980chetansingla
    @1980chetansingla 3 роки тому

    Sir you are great
    Your humor is also good for refresher
    .

  • @SimranUppal6991
    @SimranUppal6991 4 місяці тому

    Amazing lecture 💯
    There is one thing - the notebooks on your GitHub sometimes have half lines like they are cut due to their long lengths at some places.

  • @1980chetansingla
    @1980chetansingla 3 роки тому +1

    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

  • @rishavbhattacharjee7182
    @rishavbhattacharjee7182 3 роки тому +1

    Thanks for giving the dataset sir. Really helpful for practise.😁

    • @codebasics
      @codebasics  3 роки тому +2

      Yup, practice is very important

  • @mehrdad_analyst
    @mehrdad_analyst Рік тому

    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).

  • @user-hk2bb2qk7t
    @user-hk2bb2qk7t 3 місяці тому

    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

  • @lanreuzamere4994
    @lanreuzamere4994 Рік тому +1

    @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!

  • @minakshisontake3585
    @minakshisontake3585 Рік тому

    very good knowledge

  • @PP-tc1zp
    @PP-tc1zp 2 роки тому

    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?

  • @programmingwithraahim1164
    @programmingwithraahim1164 9 місяців тому +6

    23:34 for those people who are getting dummy variables to be True or False, just supply (dtype=int) in the get_dummies function.

  • @sandiproy330
    @sandiproy330 Рік тому

    Thank you, sir. This was a fantastic video tutorial. Very clearly explained.

  • @dheerajsoni9501
    @dheerajsoni9501 3 роки тому

    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.

  • @khanaftab3852
    @khanaftab3852 2 роки тому

    You are a great teacher thanku

    • @codebasics
      @codebasics  2 роки тому

      I am happy this was helpful to you.

  • @Sachin-xj1oq
    @Sachin-xj1oq 2 місяці тому

    Hi, Wonderful lecture. If I want to use Genetic Algorithm for feature selection. How can i implement in this analysis?

  • @imranh2774
    @imranh2774 3 роки тому +41

    Churn=Yes should be red and Churn=No should be green, however it is shown the other way around

    • @muditmathur465
      @muditmathur465 2 роки тому

      Correct, proper EDA shall be done for Stakeholders to be able to understand the problem better

    • @tylerpoore1487
      @tylerpoore1487 2 роки тому +5

      Glad I wasn't the only one who noticed this.

    • @parthverma7089
      @parthverma7089 Рік тому +1

      @@tylerpoore1487 nice flex

    • @lanreuzamere4994
      @lanreuzamere4994 Рік тому +2

      @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!

    • @mrIndia500
      @mrIndia500 4 місяці тому

      @@lanreuzamere4994 idea is good, but it would be so dumb to show customers being loyal in red flag. haha

  • @jongcheulkim7284
    @jongcheulkim7284 2 роки тому

    Thank you.

  • @techsavy5669
    @techsavy5669 2 роки тому +1

    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.

  • @pyclassy
    @pyclassy 3 роки тому

    can you upload any regression problem using ANN on skewed data without removing skewness.how we will train ANN in such case?

  • @vicentemantero3007
    @vicentemantero3007 2 роки тому

    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).

  • @ChPradeepKumar
    @ChPradeepKumar 2 місяці тому

    you have good sense of humor😂

  • @work-dw2hl
    @work-dw2hl 3 роки тому

    wonderful explanation

  • @sauravthakur2915
    @sauravthakur2915 3 роки тому +3

    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
      @panther_.gaming Рік тому

      wow thats some new info to me. Thanks bud. i was using round(yp,0) as it will convert all

  • @r21061991
    @r21061991 3 роки тому

    Thankyou sir

  • @yepnah3514
    @yepnah3514 3 роки тому

    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.

  • @letsexplorewithzak3614
    @letsexplorewithzak3614 3 роки тому

    Your the best, when it comes to an explanation. Do you have any community where all AI, ML or deep learning talk happen?

    • @codebasics
      @codebasics  3 роки тому

      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

  • @piyushpathak1996
    @piyushpathak1996 3 роки тому +4

    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.

  • @sankalapajena4625
    @sankalapajena4625 3 роки тому +2

    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 ..

  • @nonsnona532
    @nonsnona532 2 роки тому

    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

  • @englishprimiereleague1677
    @englishprimiereleague1677 2 роки тому

    Thanks for this wonderful video.How can I build an interface for this model

  • @gauravakotkar3222
    @gauravakotkar3222 Рік тому

    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????????

  • @reemaljaber
    @reemaljaber 2 роки тому

    thanks

  • @MohamedAli-hh3qm
    @MohamedAli-hh3qm 2 роки тому

    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.

  • @adhyanmaji2672
    @adhyanmaji2672 3 роки тому

    Sir please make a video on advanced house price regression from kaggle .

  • @dasgupts10
    @dasgupts10 Рік тому

    Is feature engineering a precursor to ANN unlike other deep learning techniques.Here we are doing feature engineering first then applying ANN

  • @NguyenNhan-yg4cb
    @NguyenNhan-yg4cb 3 роки тому

    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 ?

  • @cikguhasnah1418
    @cikguhasnah1418 2 роки тому

    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

  • @tchintchie
    @tchintchie 3 роки тому +1

    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?

    • @codebasics
      @codebasics  3 роки тому +2

      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.

  • @ubannadan-ekeh7781
    @ubannadan-ekeh7781 3 роки тому +2

    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.757
      @Sarvesh.757 3 роки тому +2

      use an additional bracket [ ]
      it will work nor

  • @JoEl-jx7dm
    @JoEl-jx7dm Рік тому

    Hey sir, can i use this model to predict the Hw dataset?

  • @MCAAlexKumar
    @MCAAlexKumar 2 роки тому

    Do a project to predict what type or what subject video will give you more views and engagement .

  • @kmnm9463
    @kmnm9463 3 роки тому

    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

  • @jishanahmed225
    @jishanahmed225 2 роки тому +1

    Nice video! By the way, scaling before the train-test split caused data leakage. How can we trust the predictions then?

    • @jishanahmed225
      @jishanahmed225 Рік тому

      @@languagetech2675 U need to rely on explainable machine learning tools to get what you want.

  • @jaysoni7812
    @jaysoni7812 3 роки тому

    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.

  • @imranuddin2153
    @imranuddin2153 2 роки тому

    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-jp5vh
      @LamNguyen-jp5vh Рік тому

      This is because he did the test split for training and testing

    • @RaunakKumar-yr3zv
      @RaunakKumar-yr3zv Рік тому

      confusion matrix shows only for X_test

  • @raunak3406
    @raunak3406 2 роки тому

    Hey you are using an ANN but what kind of ANN is it, like is it backpropagation, Delta, Kohonen. Which model is used here?

  • @ajaykushwaha4233
    @ajaykushwaha4233 2 роки тому

    How to know the number of hidden layers need to be built and the number of neurons in each hidden layer ?

  • @MaheshikaWeerasinghe
    @MaheshikaWeerasinghe 2 роки тому

    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?

    • @gautamprabhu3267
      @gautamprabhu3267 2 роки тому +4

      We prefer that when the categorical data is ordinal i.e it can be ranked. Otherwise, OHE is preferred

    • @MaheshikaWeerasinghe
      @MaheshikaWeerasinghe 2 роки тому +1

      @@gautamprabhu3267 Thanks!

  • @harikk7872
    @harikk7872 3 роки тому

    Sir i am getting error as expected axis -1 of input shape to have value 2 but received input with shape [none 5]

  • @shelidatta4885
    @shelidatta4885 10 місяців тому

    My yp values are very low as compared to your values and getting errors while creating confusion matrix.Please suggest changes.

  • @313yogesh
    @313yogesh 3 роки тому

    Great tutorial!, can you make a video on stock price prediction using lstm?

  • @sayantichakraborty228
    @sayantichakraborty228 3 роки тому

    After successful model.fit(), when I am doing "y_predict = model.predict(x_test)", I am getting error: WARNING:tensorflow:Falling back from v2 loop because of error: Failed to find data adapter that can handle input: , Plz help me to understand the issue

  • @aaryamansingla9459
    @aaryamansingla9459 2 роки тому +1

    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

    • @aliffnabil5542
      @aliffnabil5542 2 роки тому

      yes you should scale the data after the train test split to avoid data leakage from our test split into our training split

    • @theyk3817
      @theyk3817 2 роки тому

      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 .

  • @techspoc7442
    @techspoc7442 3 роки тому

    Sir , Can you make one video on keras tuner ???

  • @stevekim1357
    @stevekim1357 2 роки тому

    I am new to ML, how do you create 'Churn'? I only know variable values.

  • @shubhamvashishth8289
    @shubhamvashishth8289 Рік тому

    i have done exactly like you did but my total charges values are still the object type what should i do?

  • @rajuvarma-zk2zw
    @rajuvarma-zk2zw 3 роки тому

    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?

  • @MarcusVinicius-cu4rd
    @MarcusVinicius-cu4rd 3 роки тому

    I didn't get why my output is 1, and ini tthhe last video were 10. Wasn't it supposed to be 2? like 0 or 1? In the previous video, where we want to classify 10 groups, we use 10 as output. I know that i'm wrong but i don't understand why. Can someone help? :/

  • @rajatlingwal48
    @rajatlingwal48 5 місяців тому

    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
      @codebasics  5 місяців тому

      Hey yes. You can remove that column. In one of my videos in ML playlist I have discussed this

  • @066-pritamjena3
    @066-pritamjena3 2 місяці тому +1

    14:11 sir can you explain about that blood_sugar_men and blood_sugar_women

  • @muhammadkhubaib5666
    @muhammadkhubaib5666 3 роки тому

    sir i have problem with tensorflow not working in my laptop i try my best to install.. but still face problem regarding module error not found

  • @flaviobrienza6081
    @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.

  • @humanandlifefacts9217
    @humanandlifefacts9217 Рік тому

    the dataset has already column if a customer churned or not. Then what are we really predicting ?

  • @abhinavsingh-wl4yz
    @abhinavsingh-wl4yz 2 роки тому +1

    What is the use of blood_sugar_men and blood_sugar_women

  • @yashvardhan.singh3009
    @yashvardhan.singh3009 Рік тому +1

    precision recall f1-score support
    0 0.96 0.87 0.91 1745
    1 0.46 0.73 0.56 255
    accuracy 0.85 2000
    macro avg 0.71 0.80 0.74 2000
    weighted avg 0.89 0.85 0.87 2000
    exercise answers, 40 epochs did the work,

  • @amanrohilla6659
    @amanrohilla6659 Місяць тому

    what is the end result of this prediction like kya fayda hora hai??

  • @solowolf5304
    @solowolf5304 2 роки тому

    how can we build a decision boundry for this problem

  • @hiteshsahoo9283
    @hiteshsahoo9283 11 місяців тому

    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??

  • @digitalnomad2196
    @digitalnomad2196 Рік тому

    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

    • @codebasics
      @codebasics  Рік тому +1

      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.

    • @digitalnomad2196
      @digitalnomad2196 Рік тому

      @@codebasics Thank you, I'll check those out. What do you think a good simple deployment for this project would consist of ?

  • @Codeplay13
    @Codeplay13 3 роки тому +1

    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

    • @otsogileonalepelo9610
      @otsogileonalepelo9610 2 роки тому

      This is the same observation I made as well, do you understand why?

  • @mdjahidhasan513
    @mdjahidhasan513 3 роки тому

    My accuracy of every epoch remains the same. It does not change at all. What is the problem?

  • @foxbat296
    @foxbat296 3 роки тому

    Thanks for the wonderful clip..can you make a tutorial on optimizing NN using GA.. Since you explain things so nicely this will really help

  • @mdjahidhasan513
    @mdjahidhasan513 3 роки тому

    My accuracy of every epoch remains same. It does not change at all. What is the problem of my model?

  • @hardikvegad3508
    @hardikvegad3508 3 роки тому +2

    8.42 how did you removed that warning message??

    • @shaikansarbasha4169
      @shaikansarbasha4169 3 роки тому +1

      use this code you will not get any warnings
      import warnings
      warnings.filterwarnings('ignore')

  • @1980chetansingla
    @1980chetansingla 3 роки тому

    I have 7 columns input and one column in output .
    What you suggest for predicting model ??
    ANN??

    • @codebasics
      @codebasics  3 роки тому

      Depends. you can use ANN or SVM,logistic regression if it is a classification problem

  • @depeshkumarmohanty9522
    @depeshkumarmohanty9522 3 роки тому

    sir can you plz interpret the output in business term to a layman person . You just stopped in confusion matrix

    • @codebasics
      @codebasics  3 роки тому +1

      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

  • @abhisheknagar9000
    @abhisheknagar9000 3 роки тому

    Hello sir,
    Thanks for the nice tutorial, I attempted the assignment and accuracy was around 80%, but model is only predicting the 0 cases.
    Is it the overfit model?
    When I checked for dataset the value for Exited columns is highly imbalanced (80:20) Approx.
    Now the question is how to handle the imbalance dataset?

    • @codebasics
      @codebasics  3 роки тому

      Yup the dataset is indeed imbalanced. I will add new video and solve this exercise and show you how to tackle this imbalance.

    • @digitalnomad2196
      @digitalnomad2196 Рік тому

      @@codebasics Hi did you add a new video about the data imbalance

  • @shakib_04
    @shakib_04 3 роки тому

    nice t-shirt. where i can get this?

  • @selescadevi7925
    @selescadevi7925 3 роки тому

    after importing tensorflow , it shows error after run .why?

  • @sapnaarora9546
    @sapnaarora9546 3 роки тому

    In my dataset, there are three different output variables i.e. good, excellent, and poor. So, I am using categorical_crossentropy and softmax as activation in the output layer.
    ann.add(tf.keras.layers.Dense(units=6, activation='relu'))
    ann.add(tf.keras.layers.Dense(units='softmax'
    ann.fit(X_train, y_train, batch_size = 32, epochs = 100)
    an error occurred
    ValueError: Shapes (None, 1) and (None, 3) are incompatible
    could you please let me know the soln for the same

    • @shreyjain6447
      @shreyjain6447 2 роки тому +1

      For multiclass classification use sparse categorical cross entropy as the loss function and Label encode the target variable. That should solve the problem

  • @itsmeatrin
    @itsmeatrin Рік тому

    27:23 O_O dude forgot it's not time for his evil mastermind to come out LMAO

  • @AjinkyaBhushan
    @AjinkyaBhushan 2 місяці тому +1

    18:30 the df1.replace('No internet service', 'No', inplace=True) is not working
    Can anyone suggest any help?

    • @AjinkyaBhushan
      @AjinkyaBhushan 2 місяці тому +1

      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()}')

  • @genesisrevelation1940
    @genesisrevelation1940 6 місяців тому

    Hello @codebasics... my one hot encoding does not porduce 1 and 0, instead it generated false and true. could you pls assist me... here is the code line
    import pandas as pd
    df=pd.read_csv(r'C:\Users\Desktop\WA_Fn-UseC_-Telco-Customer-Churn.csv')
    pd1=pd.get_dummies(data=df, columns=['InternetService']) #one hot encoding

  • @amitsaxena9122
    @amitsaxena9122 3 роки тому

    Plz explain about NLP ,can we make a model from scratch in python .plz make a video on NLP ...thank you sir

    • @codebasics
      @codebasics  3 роки тому +1

      yes NLP videos will be coming soon