49 - Logistic Regression using scikit-learn in Python

Поделиться
HTML-код
  • Опубликовано: 7 окт 2024
  • This tutorial explains the few lines to code logistic regression in Python using scikit-learn library.
    The code from this video is available at: github.com/bns...

Комментарии • 40

  • @pranavpalaniappan3816
    @pranavpalaniappan3816 2 месяца назад +2

    I usually do not comment on videos but had to for this one. Wonderfully explained with step-by-step instructions. Thank you!

  • @hbale18
    @hbale18 5 лет назад +10

    Sreeni......exceptional work man! The quality of your content and simplicity in explaining key concepts is very impressive. Keep up the awesome work!

    • @DigitalSreeni
      @DigitalSreeni  5 лет назад +1

      Thanks for the encouraging comment :)

    • @msuliman4296
      @msuliman4296 9 месяцев назад

      @@DigitalSreeni Sir please share this dataset

  • @samarafroz9852
    @samarafroz9852 4 года назад +3

    Great work best video for machine learning algorithm I've ever seen

  • @felip6180
    @felip6180 4 года назад +1

    Thank YOU for your time and patience for the videos!

  • @crane5832
    @crane5832 3 года назад

    Love this video. This is the most explicit and practical tutorial on logistic regression in Python I've ever seen.

    • @DigitalSreeni
      @DigitalSreeni  3 года назад +1

      Great to hear!

    • @msuliman4296
      @msuliman4296 9 месяцев назад

      @@DigitalSreeni Sir please share the dataset(csv)

  • @vmdhar
    @vmdhar 3 года назад +1

    if the Visualization is also shown within this tutorial then it would be a wonderful explanation as you do always. Thank you for sharing

  • @CarburatorTv
    @CarburatorTv 4 месяца назад

    Great tutorial, thank you, Sreeni!

  • @sb39f3
    @sb39f3 5 лет назад +1

    Nice step by step explanation :)

  • @obeynjanjeni4466
    @obeynjanjeni4466 2 года назад

    Thank you sir, this is pretty good. an exceptional work indeed

  • @menukawijayarathne886
    @menukawijayarathne886 3 года назад +1

    great content..keep it uploading!!

  • @na9hme
    @na9hme 2 года назад

    I appreciate you ... the tutorials are really helpful

  • @kaushikgupta1410
    @kaushikgupta1410 2 года назад

    Sir, You explained these concepts in a best possible way! Thanks for helping us a lot .
    Any suggestions for Beginners?

  • @saeedakbari4714
    @saeedakbari4714 Месяц назад

    Thank you so much...fantastic

  • @Марсель-и9с
    @Марсель-и9с 4 года назад +1

    Great job man. i know about logistic regretion but not using model selection and train test imports.. Good to learn a quick way to make it
    Some improvements on this code, find a way to show the sigmoid and the cost x iteraction graph.
    edit: This code uses 100 iteractions as max number, wheres only 27 were needed. The Learning ratio or alpha, well i was looking for it, until realize that this is a Stochastic Average Gradient. Wich we can obtain the number, but we can't modify it..

    • @Марсель-и9с
      @Марсель-и9с 4 года назад +1

      For those who are interested about it:
      datascience.stackexchange.com/questions/16751/learning-rate-in-logistic-regression-with-sklearn
      As it says, this one defines the method hal.inria.fr/hal-00860051/document
      and this one defines the implementation of the solver:
      github.com/scikit-learn/scikit-learn/blob/a24c8b464d094d2c468a16ea9f8bf8d42d949f84/sklearn/linear_model/sag.py
      The learning rate, or alpha is a fixed value = 1

  • @mesutsamsti5940
    @mesutsamsti5940 2 года назад

    Thank you so much 🙏

  • @baironmanuelvinez720
    @baironmanuelvinez720 4 года назад +1

    I think you can improve the prediction keeping user feature un the model using one hot encoding,

  • @mcb-e9e
    @mcb-e9e 3 года назад +1

    Thank for the video.
    What should we do if the dataset is divided %90 is 0 %10 percent is 1?

  • @falfalkao5104
    @falfalkao5104 4 года назад +1

    Thanks for your nice work. May you show me what difference between random_state =20 or 1 or other numbers that are not None? Thanks

    • @DigitalSreeni
      @DigitalSreeni  4 года назад +2

      It doesn't make any difference when you use 20 or 1 or something else for random state. It is there to split data the same way every time you split. If you keep random state to 20 then it the split would be the same. If you have random state as None then every time you split it would be different, which makes any troubleshooting challenging.

  • @johnpuskin463
    @johnpuskin463 3 года назад +1

    The result of Logistic Regression function is a real number within [0,1]. Thus, you can set df.Productivity within [0,1].
    However, you set df.Productivty=2 in Line 25. It must be 0. Do I miss something?

    • @DigitalSreeni
      @DigitalSreeni  3 года назад +1

      The 1 and 2 for productivity are the labels for Good and Bad, respectively. The labels can be anything, it has nothing to do with the range for logistic regression. The range for logistic regression goes from 0 (low probability) to 1 (high probability). Based on the probability the system sets a threshold to convert probability to classification. In summary, if the probability for a data point to belong to class labeled as 2 is high (e.g. 0.8) then that data point is assigned to class 2.

    • @johnpuskin463
      @johnpuskin463 3 года назад +1

      @@DigitalSreeni Ok. I understand that LogisticRegression results are internally converted to our integer labels within skilearn functions automatically.

  • @jeanvaljean9350
    @jeanvaljean9350 4 года назад +1

    what if the output is not only "bad" or "good" but what if there's "normal" too? It isn't binary anymore. How can i deal with it please?

  • @anasabdulla5205
    @anasabdulla5205 4 года назад +1

    Can we do this method for multiple class classification problems? instead of 2

    • @DigitalSreeni
      @DigitalSreeni  4 года назад

      Yes. Here is an example: scikit-learn.org/stable/auto_examples/linear_model/plot_iris_logistic.html

  • @bhavanasingh2390
    @bhavanasingh2390 2 года назад

    Hey, I am working on Google Colaboratory.
    And this line of code Y = Y.astype('int') is not working.
    kindly help.

  • @achininisansala5124
    @achininisansala5124 Год назад +1

    where can I get this dataset

  • @judeleon8485
    @judeleon8485 4 года назад +1

    Nice tutorial. However, instead you telling us go the previous tutorial, why not leave the link here, so it would be easy to find it. Or better still leave a link to the play list

    • @DigitalSreeni
      @DigitalSreeni  4 года назад +1

      When I usually refer to previous video mean the previous video in my numbering scheme. For example, the previous video to this video would be video 48. It would be a lot of effort for me to directly post links in description but I understand your pain. It is always a choice between recording new videos or go back and add more info to description. One of these days I hope to find time time to add more description.