Logistic Regression in Python | Logistic Regression Example | Machine Learning Algorithms | Edureka

Поділитися
Вставка
  • Опубліковано 26 гру 2024

КОМЕНТАРІ • 348

  • @edurekaIN
    @edurekaIN  6 років тому +19

    Got a question on the topic? Please share it in the comment section below and our experts will answer it for you. For Edureka Python Machine Learning Course curriculum, Visit our Website: bit.ly/2OpzQWw

    • @srikanthkuchi7743
      @srikanthkuchi7743 6 років тому +2

      Thank you so much

    • @kamakhyasingh9994
      @kamakhyasingh9994 4 роки тому +1

      It's an awesome explanation, Thank you very much, Please share the source code & datasets to my mail id : rkamakhya@gmail.com

    • @sanatansuryavikram
      @sanatansuryavikram 4 роки тому

      Shrey
      1 second ago
      hi what if the labels , dependent variable is 7 and 8 do you have to change it to 0- and 1 or do i keep it as it is to perform logistic regression pleas reply asap.

    • @edurekaIN
      @edurekaIN  4 роки тому +1

      Hi Shrey, it has to be dichotomous. So if there are only two categories, you can transform the labels. Hope that solves your query.

  • @BriteRoy
    @BriteRoy 5 років тому +47

    How do you speak so flawlessly without fumbling or pausing even for once. Hats off.

  • @ShubhamKumar-fy1fl
    @ShubhamKumar-fy1fl 4 роки тому +25

    In the world full of greed no one is providing knowledge for free. Edureka you are doing great job 👍

  • @himanshushekharsingh5270
    @himanshushekharsingh5270 4 роки тому +5

    Just to clear my concept on logistic regression i searched L R and saw this video. It is perfectly explained by the instructor. Each and every part is well explained. Glad to see this video. A big thumbs up👍 and Thanks.

  • @sureshkumaratkuri1053
    @sureshkumaratkuri1053 6 років тому +15

    Excellent explanation. The way you prepare PPTs to explain the concepts is matchless in the industry. keep it up.

  • @astrovert.ed2321
    @astrovert.ed2321 4 роки тому +4

    This one hour video has given immense clarity and confidence. Thanks team!

  • @sayanbanerjee362
    @sayanbanerjee362 5 років тому +9

    "Over here" great job! 👍🏻

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

    I really felt very happy with your explanation, very useful for begginers

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

      Glad it was helpful! Keep learning with us .

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

    Amazingly defined 👍 Thankyou

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

    GREAT EXPLANATION MAM

  • @naynadhone5908
    @naynadhone5908 5 років тому +7

    Thank you mam.. got all the concepts...

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

    Great explanation 👌 👍 👏 😀

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

    Fantabulous Presentation Mam!

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

      Good To know our vedios are helping you learn better :) Stay connected with us and keep learning ! Do subscribe the channel for more updates : )

  • @vikashchoubey4570
    @vikashchoubey4570 4 роки тому +1

    very much useful it is. thank you

  • @poornaacharya6910
    @poornaacharya6910 5 років тому +6

    You guys are awesome! Explained the concept very clearly and in an understandable way. Thanks a lot!!!

  • @dikshamakkar2850
    @dikshamakkar2850 4 роки тому

    Explanation is tooo good.... Thnkz alot😊

  • @shivaaryaprakash
    @shivaaryaprakash 5 років тому +1

    You are very very efficient speaker and have delivered great analysis.. thank you

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

    My goodness! How did you get this good at teaching. 👏👏👏

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

      You're welcome 😊 Stay connected with our channel and team :) . Do subscribe the channel for more updates : ) Hit the bell icon to never miss an update from our channel : )

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

    Thankyou ...was able to understand all the concept

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

      Thank you so much for the review ,we appreciate your efforts : ) We are glad that you have enjoyed your learning experience with us .Thank You for being a part of our Edureka team : ) Do subscribe the channel for more updates : ) Hit the bell icon to never miss an update from our channel : )

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

    Great session! Thank you :)

  • @elebs_d
    @elebs_d 5 років тому +10

    God bless you, Thank you so much for this

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

    Thanks for your video. It makes life easier.

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

    It's a great tutorial. Take a bow..

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

      Thank you 😊 Glad it helped !!

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

    Please make tutorials on path planing in robotics and practical implementation

  • @sandeeppanchal8615
    @sandeeppanchal8615 6 років тому +14

    Hi, presentation is really good. Anybody can understand it easily. Thanks for such wonderful lecture.
    Input: Our prediction can go to ~ 82% if we can fill the null values in 'Age' column with average values and can be done by 2 methods.
    1) Fill the null values with the value which is the average of all age. (df['Age].mean(). Where df variable name for our dataframe)
    2) Fill the null values by taking the average values with respect to column 'Pclass'. Example: If average age of passengers travelling in 1st class is taken and fill the null values with respect to 1st class. Same is done for 2nd and 3rd class. Average age with respect to 'Pclass' can be assumed from the boxplot of seaborn with 'Age' as x and 'Pclass' as y.
    Method 2 is better over method 1.
    Look at the code to fill the null values in 'Age' with respect to 'Pclass'. (train is the variable name of dataframe)
    *********************************************************************************
    def impute_age(cols):
    Age = cols[0]
    Pclass = cols[1]

    if pd.isnull(Age):
    if Pclass == 1:
    return 37
    elif Pclass == 2:
    return 29
    else:
    return 24
    else:
    return Age
    train['Age'] = train[['Age','Pclass']].apply(impute_age,axis=1)
    *******************************************************************************
    My prediction is as follows:
    Accuracy:
    82.02247191011236
    *******************************************************************************
    Classification Report
    precision recall f1-score support
    0 0.81 0.93 0.86 163
    1 0.85 0.65 0.74 104
    micro avg 0.82 0.82 0.82 267
    macro avg 0.83 0.79 0.80 267
    weighted avg 0.82 0.82 0.81 267
    *******************************************************************************
    Confusion Matrix:
    [[151 12]
    [ 36 68]]
    *******************************************************************************
    Predicted 0 1
    Actual
    0 151 12
    1 36 68

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

    Thank You, its a very helpful Video. Like to share share 2 points - 1) In Code line # 63 I could not import cross_validation from sklearn library, so I substituted with 'from sklearn.linear_model import LogisticRegression' and then it worked 2) I dropped "Fare" column and it gave a 100 % accuracy on test data !

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

    Simply wow. Excellent explanation by you mam. We need professors like u.

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

      Hi : ) We really are glad to hear this ! Truly feels good that our team is delivering and making your learning easier :) Keep learning with us .Stay connected with our channel and team :) . Do subscribe the channel for more updates : ) Hit the bell icon to never miss an update from our channel : )

  • @Mithilesh165
    @Mithilesh165 5 років тому +1

    Thanks Edureka....your videos are of high quality ...

  • @ankitkaushal1592
    @ankitkaushal1592 4 роки тому

    Very much helpful mam🤗

  • @avdbzben
    @avdbzben 4 роки тому +1

    Very nice explanation

  • @akshunair3367
    @akshunair3367 4 роки тому +1

    Loved the way the lesson is taught.

  • @kishanraval8079
    @kishanraval8079 4 роки тому

    this is awesome my concept of logistic regression is clear now

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

    Well Explained mam thnx

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

    The real definition of a Queen. Thank you for this.

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

      Hi : ) We really are glad to hear this ! Truly feels good that our team is delivering and making your learning easier :) Keep learning with us .Stay connected with our channel and team :) . Do subscribe the channel for more updates : ) Hit the bell icon to never miss an update from our channel : )

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

    It's so understandable lesson! Thank you.

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

    What is the real practical application of this titanic data set ?

  • @gautamar1455
    @gautamar1455 4 роки тому +1

    wow very rich in content explained well

  • @ArunKumar-mi2iq
    @ArunKumar-mi2iq 2 роки тому +1

    After many videos , I got a nice explanation. Kudos to you mam ❤️

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

      We are super happy that Edureka is helping you learn better. Your support means a lot to us and it motivated us to create even better learning content and courses experience for you . Do subscribe the channel for more updates : ) Hit the bell icon to never miss an update from our channel : )

  • @80amnesia
    @80amnesia 4 роки тому

    very useful real case example

  • @jayanthck1782
    @jayanthck1782 4 роки тому

    Best explanation on logistic regression thank u so much..

  • @cibusexim2817
    @cibusexim2817 4 роки тому +1

    good explanation

  • @nitinmalhotra423
    @nitinmalhotra423 4 роки тому

    Thanks Edureka got all the concepts cleared.

  • @yash-vh9tk
    @yash-vh9tk 4 роки тому

    Wow. Great explanation

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

    Thank you mam you explained very well love it😀❤️❤️❤️

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

      Hi : ) We really are glad to hear this ! Truly feels good that our team is delivering and making your learning easier :) Keep learning with us .Stay connected with our channel and team :) . Do subscribe the channel for more updates : ) Hit the bell icon to never miss an update from our channel : )

  • @VIVEKYADAV-gc1ti
    @VIVEKYADAV-gc1ti 3 роки тому +1

    Mam i got 💯% accuracy at Titanic Dataset 💪💪💪💪✊✊👍👍👍

  • @HJ-uy6ez
    @HJ-uy6ez 3 роки тому +1

    You did an excellent job, thank you very much!

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

      You're welcome 😊 Stay connected with our channel and team :) . Do subscribe the channel for more updates : ) Hit the bell icon to never miss an update from our channel : )

  • @simransimran6766
    @simransimran6766 4 роки тому

    Best explanation ever

  • @PushK-yu5ph
    @PushK-yu5ph 4 роки тому +3

    Great video and a very thorough and clear explanation . Helpful session for the day . Thanks a lot !!!

  • @abdellatifthabet568
    @abdellatifthabet568 5 років тому +2

    thank you ma'am.. keep it up

  • @deeptikhanvilkar5983
    @deeptikhanvilkar5983 5 років тому +1

    Very good explanation for each line of code. Loved it

  • @siddharthkshirsagar2545
    @siddharthkshirsagar2545 5 років тому

    Best explanation on regression so far thank u so much

  • @krutarthkhatri5243
    @krutarthkhatri5243 4 роки тому

    best explanation of logistic regression

  • @v9054
    @v9054 4 роки тому

    Excellent presentation.

  • @pravinsamgir964
    @pravinsamgir964 4 роки тому

    Thank you... Really helpful.

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

    Beautiful

  • @maheshvangala8472
    @maheshvangala8472 4 роки тому

    Thank you so much 😍😍

  • @rajivgupta6573
    @rajivgupta6573 4 роки тому

    Titanic Survivors
    Accuracy score can be increased to ~84%
    Do this,
    X_train,X_test,y_train,y_test = train_test_split(X,y, test_size = 0.2, random_state = 33)
    You might get error in some cases, so also change this,
    model = LogisticRegression(solver='lbfgs',max_iter=10000)
    Output
    print(classification_report(y_test,y_pred))
    precision recall f1-score support
    0 0.84 0.91 0.87 111
    1 0.83 0.72 0.77 67
    accuracy 0.84 178
    macro avg 0.83 0.81 0.82 178
    weighted avg 0.84 0.84 0.83 178

  • @bilalbaloch9366
    @bilalbaloch9366 6 років тому +6

    well explained , My concepts about logistic regression have cleared . Thank you

    • @edurekaIN
      @edurekaIN  6 років тому +1

      Hey Bilal, we are glad you feel this way. Do subscribe and hit the bell icon to never miss an update from us in the future. Cheers!

  • @samarthgarg4639
    @samarthgarg4639 5 років тому +1

    Just a suggestion, if you also share the data being analysed in the videos, it would be a big help to the ones who are watching

    • @edurekaIN
      @edurekaIN  5 років тому

      Hi Samarth, thanks for the feedback. We will definitely look into your suggestion. Please mention your email id (it will not be published). We will forward the data to your email address.

  • @DuyKDao
    @DuyKDao 5 років тому +1

    Thx u. Very clear instruction

  • @shaikyasmin2559
    @shaikyasmin2559 6 років тому +4

    Thank you mam ,your video very clear ,good help us

    • @edurekaIN
      @edurekaIN  6 років тому +1

      Thanks for the compliment Yasmin, we are glad you loved the video. Do subscribe to the channel and hit the bell icon to never miss an update from us in the future. Cheers!

    • @shaikyasmin2559
      @shaikyasmin2559 6 років тому

      @@edurekaIN OK mam

  • @geetikabansal2196
    @geetikabansal2196 4 роки тому

    Thankyou Soooooo Much Ma'am!!!!!!

  • @rakhipatil2372
    @rakhipatil2372 6 років тому +1

    Nice video..Please provide the data set

  • @solankitarun911
    @solankitarun911 4 роки тому

    Thank u..😇

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

    Outstanding explanation. I am pursuing AI Silver from Pixel Tests but your way of explanation is by far the best one. Thanks for sharing your knowledge. Sharing is caring indeed.

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

      We are very glad to hear that your a learning well with our contents 😊 continue to learn with us and don't forget to subscribe our channel so that you don't miss any updates !

  • @darshanabhole
    @darshanabhole 4 роки тому

    helpfull..thnku

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

    Great explain..from where can I fetch dataset?

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

      We are happy that Edureka is helping you learn better ! We are happy to have learners like you :) Please share your mail id to share the data sheets :) Do subscribe the channel for more updates : ) Hit the bell icon to never miss an update from our channel : )

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

    Wonderful explanation madam

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

      Thank You 😊 Glad it was helpful!! Keep learning with us..

  • @padhiyarkunalalk6342
    @padhiyarkunalalk6342 5 років тому +1

    Mem your teaching skill is excellent
    You explain point to point and in detail.
    #thnx for making this video

  • @sureshkumarbevara8069
    @sureshkumarbevara8069 5 років тому +2

    Thank you, This is very helpful for my studies.

  • @KamleshSharma-si2rq
    @KamleshSharma-si2rq 6 років тому +1

    One of the best tutorial ever,Mam can you pls share the dataset and source code...Thank you.

    • @edurekaIN
      @edurekaIN  6 років тому

      Hey Kamlesh, we are glad you loved the video. Do mention your email ID over here and we will send the files to you. Cheers!

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

    great video

  • @abhayvashokan5580
    @abhayvashokan5580 5 років тому

    Awesome! Really liked it. Live presentations are never this good.

  • @banothanilkumar1140
    @banothanilkumar1140 5 років тому +1

    Thanks you madam it very clear cut explanation

  • @matitiudeforever8155
    @matitiudeforever8155 6 років тому +2

    perfect !! freaking awesome !!...subscribed

    • @edurekaIN
      @edurekaIN  6 років тому +1

      Hey Matitiude, thanks for subscribing! We are glad you loved the video. Do take a look at our other videos too and stay tuned for future updates. Cheers!

  • @usmanmalik2182
    @usmanmalik2182 5 років тому

    Very well explain. Keep it up Edureka! Team

  • @shreyastc8975
    @shreyastc8975 4 роки тому

    Can you please provide data sets as well

  • @Raos-Academy
    @Raos-Academy 6 років тому +1

    Thank you soo much very nice class

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

    Thanks for Nice lecture .
    please send data set list for practices.

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

      Definitely ! We are glad to have learners like you .Drop your mail id in the comment section for us to share the data sheets or source codes :) Do subscribe our channel and hit that bell icon to never miss an video from our channel .

  • @rajasharma3513
    @rajasharma3513 5 років тому

    Thanks for giving simple short and meaning full information.Thanks

    • @edurekaIN
      @edurekaIN  5 років тому

      Hey Raja, Thank you for appreciating our efforts. We are glad you loved the video. Do subscribe, like and share to stay connected with us!

  • @adityapawar7279
    @adityapawar7279 5 років тому +1

    A very helpful video.Thank you for the brief tutorial on using Jupyter notebook.

    • @edurekaIN
      @edurekaIN  5 років тому

      Hi Aditya, thank you for watching our video. Do subscribe, like and share to stay connected with us. Cheers!

  • @shashikantbharti3157
    @shashikantbharti3157 5 років тому +1

    Thank You, This tutorial is Very Nice

  • @swarupdas9103
    @swarupdas9103 5 років тому +1

    Great explanation,pls share me the datasets

  • @divyadarbe
    @divyadarbe 5 років тому

    Thank you Madam! very good explanation

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

    can you provide dataset along with tutorial ? or link to get it? on kaggle many datasets are there with 'titanic' name

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

      Hi ! Good to know that our videos are helping you to learn better 😊 Please share your mail id to share the data sheets, We’ll update you soon . Do subscribe the channel for more updates.

  • @viveksthanam
    @viveksthanam 6 років тому +4

    Hello Can you also make a video on how to plot these predicted values.

    • @edurekaIN
      @edurekaIN  6 років тому

      Hey Vivek, we will definitely look into your suggestions. We update our channel regularly, stay tuned and never miss out on our updates. Cheers :)

  • @NamedAfterColor
    @NamedAfterColor 5 років тому

    Thank you so much.

  • @gajendraraiec
    @gajendraraiec 5 років тому

    You Guys are awesome.

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

    excellent

  • @sandeepkumarghosh9531
    @sandeepkumarghosh9531 5 років тому +1

    Great explanation within a short span of time.This lecture has been very helpful.Thank you mam!

  • @sahilgoura691
    @sahilgoura691 5 років тому

    The video is very nice. The way our concepts are getting cleared. Please give us the link to download the notebook which you created as titanic.

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

    Do you have a video where you did odds and odd ratio for Logistic Regression?

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

      We do have logistic regression videos that cover everything ua-cam.com/video/VCJdg7YBbAQ/v-deo.html if you need more kindly visit our channel :) dont forget to subscribe for more such videos

  • @krishnaaggarwal9228
    @krishnaaggarwal9228 5 років тому

    very well explained ,thank you for such good explanation...

  • @puthayallaiah5586
    @puthayallaiah5586 5 років тому

    Thank you mam for vaulable class on logistics regrations and it gives a clear underatanding to me for alogirthms development in ML

  • @mohammadmamun5193
    @mohammadmamun5193 6 років тому

    One of the best videos in detailed.thanks a lot

    • @edurekaIN
      @edurekaIN  6 років тому

      Hey Mohammad, thanks for the compliment. We are glad you loved the video. Do subscribe and hit the bell icon to never miss an update from us in the future. Cheers!

  • @muhammadiqbalbazmi9275
    @muhammadiqbalbazmi9275 5 років тому +1

    Thanks a lot, Sister. Keep it up.

  • @umeshrajs438
    @umeshrajs438 4 роки тому

    well explained

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

    Thank you for such a wonderful lesson!

  • @SayanAdhikari-tz3bj
    @SayanAdhikari-tz3bj 4 роки тому

    Do we need to install the sklearn module using pip ?

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

      Hi Sayan, you will use pip install scikit-learn on your python shell.

  • @Modern_revolution
    @Modern_revolution 5 років тому +1

    Thanks