49 - Logistic Regression using scikit-learn in Python

  Рет қаралды 11,351

DigitalSreeni

DigitalSreeni

4 жыл бұрын

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
@hbale18
@hbale18 4 жыл бұрын
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 жыл бұрын
Thanks for the encouraging comment :)
@msuliman4296
@msuliman4296 6 ай бұрын
@@DigitalSreeni Sir please share this dataset
@samarafroz9852
@samarafroz9852 4 жыл бұрын
Great work best video for machine learning algorithm I've ever seen
@felip6180
@felip6180 4 жыл бұрын
Thank YOU for your time and patience for the videos!
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
My pleasure!
@vmdhar
@vmdhar 2 жыл бұрын
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 Ай бұрын
Great tutorial, thank you, Sreeni!
@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 жыл бұрын
Great to hear!
@msuliman4296
@msuliman4296 6 ай бұрын
@@DigitalSreeni Sir please share the dataset(csv)
@sb39f3
@sb39f3 4 жыл бұрын
Nice step by step explanation :)
@kaushikgupta1410
@kaushikgupta1410 2 жыл бұрын
Sir, You explained these concepts in a best possible way! Thanks for helping us a lot . Any suggestions for Beginners?
@obeynjanjeni4466
@obeynjanjeni4466 2 жыл бұрын
Thank you sir, this is pretty good. an exceptional work indeed
@menukawijayarathne886
@menukawijayarathne886 3 жыл бұрын
great content..keep it uploading!!
@na9hme
@na9hme 2 жыл бұрын
I appreciate you ... the tutorials are really helpful
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
Glad you like them!
@muratcanbekler8112
@muratcanbekler8112 3 жыл бұрын
Thank for the video. What should we do if the dataset is divided %90 is 0 %10 percent is 1?
@baironmanuelvinez720
@baironmanuelvinez720 4 жыл бұрын
I think you can improve the prediction keeping user feature un the model using one hot encoding,
@falfalkao5104
@falfalkao5104 4 жыл бұрын
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 жыл бұрын
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.
@mesutsamsti5940
@mesutsamsti5940 Жыл бұрын
Thank you so much 🙏
@DigitalSreeni
@DigitalSreeni Жыл бұрын
You're welcome 😊
@user-ru9iz4lp6y
@user-ru9iz4lp6y 4 жыл бұрын
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 жыл бұрын
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
@jeanvaljean9350
@jeanvaljean9350 4 жыл бұрын
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 жыл бұрын
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 жыл бұрын
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 жыл бұрын
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 жыл бұрын
@@DigitalSreeni Ok. I understand that LogisticRegression results are internally converted to our integer labels within skilearn functions automatically.
@achininisansala5124
@achininisansala5124 Жыл бұрын
where can I get this dataset
@msuliman4296
@msuliman4296 6 ай бұрын
same problem
@msuliman4296
@msuliman4296 6 ай бұрын
😋😪
@judeleon8485
@judeleon8485 3 жыл бұрын
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 жыл бұрын
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.
50 - What is k-means clustering and how to code it in Python?
16:55
DigitalSreeni
Рет қаралды 12 М.
45 - Linear regression using Sci-Kit Learn in Python
25:20
DigitalSreeni
Рет қаралды 8 М.
1❤️
00:17
Nonomen ノノメン
Рет қаралды 12 МЛН
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 8 МЛН
44 - What is linear regression?
16:56
DigitalSreeni
Рет қаралды 6 М.
Logistic Regression in R, Clearly Explained!!!!
17:15
StatQuest with Josh Starmer
Рет қаралды 509 М.
47 - Multiple Linear Regression with SciKit-Learn in Python
13:18
DigitalSreeni
Рет қаралды 11 М.
60 - How to use Random Forest in Python?
32:17
DigitalSreeni
Рет қаралды 38 М.
59 - What is Random Forest classifier?
21:46
DigitalSreeni
Рет қаралды 16 М.
Choose a phone for your mom
0:20
ChooseGift
Рет қаралды 4,8 МЛН
Как слушать музыку с помощью чека?
0:36