49 - Logistic Regression using scikit-learn in Python

Поділитися
Вставка
  • Опубліковано 23 вер 2019
  • 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/bnsreenu/python_fo...
  • Наука та технологія

КОМЕНТАРІ • 37

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

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

  • @hbale18
    @hbale18 4 роки тому +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  4 роки тому +1

      Thanks for the encouraging comment :)

    • @msuliman4296
      @msuliman4296 7 місяців тому

      @@DigitalSreeni Sir please share this dataset

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

    Great tutorial, thank you, Sreeni!

  • @vmdhar
    @vmdhar 2 роки тому +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

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

      @@DigitalSreeni Sir please share the dataset(csv)

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

    Nice step by step explanation :)

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

    great content..keep it uploading!!

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

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

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

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

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

    I appreciate you ... the tutorials are really helpful

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

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

  • @user-ru9iz4lp6y
    @user-ru9iz4lp6y 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..

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

    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,

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

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

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

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

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

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

    where can I get this dataset

  • @judeleon8485
    @judeleon8485 3 роки тому +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  3 роки тому +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.