Logistic Regression Loss Function – Hyper Parameter Tuning & Evaluation Metrics – Part 3 (2020)

preview_player
Показать описание
In this video, we will go over a Logistic Regression example in Python using Machine Learning and the SKLearn library. This tutorial is for absolute beginners. We will cover all the steps of the machine learning process. I also explain some of the theory to help you understand Machine Learning and Logistic Regression in general.

Support the channel on Patreon:

Data Analytics Course Link:

Tutorial Overview

Video 1:
1. What is Machine Learning
2. Process of Machine Learning
3. Problem Formulation
4. Loading the Raw Data
5. Data Preprocessing
• EDA

Video 2:
5. Data Preprocessing
• Data Cleaning
• Feature Selection
6. Splitting the Raw Data
7. What is Logistic Regression Analysis

Video 3:
8. Running Logistic Regression
9. Evaluating the Model
10. Hyper Parameter Tuning
11. Final Model with Selected Parameters
12. How to use our L. Regression model

How to download and install Python through Anaconda:

Download the raw data & the Python Notebook:

Seaborn Tutorial:

Yiannis Pitsillides on Social Media:

Hands-on Machine Learning with Scikit-Learn, Keras, and TensorFlow Book:
Рекомендации по теме
Комментарии
Автор

Hey Data Friends! Did you enjoy this series of tutorials? What did you like/dislike the most? What do you think I should do next? Please let me know in the comments below!

YiannisPi
Автор

I honestly have learned so much from this video. Keep making more man. you are my superhero.

Gannu
Автор

Best online tutorial, I really appreciate the time you spent going step by step. Your tutorial has helped my PhD data

glenmason
Автор

I like the video because it start from the data processing, which is never taught by my professor.

yanlin
Автор

your videos are top level man, congratulations, you deserve x100 more subscribers

chinchenhanchi
Автор

Extremely useful video, better to watch than the last 3 Tarantino movies
Thank you :)

victorreloadedCHANEL
Автор

Excellent tutorial; steadily progressing further and beyond!

andreasp.
Автор

I did not knew about the part of false positive on foward, except from the l.regression.
This is the best video about application of machine learning and logistic regression with python that ive found on yt. although i must say that idk if this is the right one for beginners. Well, i would like to know if this is only the beginning or is that all, cause i can see some additions like change the type of logistic regression, where u can use a specific learning rate, and plot the cost function x iteraction..
only 974 views, this probably will grow. thanks man

Марсель-ис
Автор

Great work. Thanks for the video. It helped me a lot.

miralpipaliya
Автор

So grateful for the video and such great contents! Super helpful and knowledgable, thank you!

angelanfish
Автор

I have one question shouldn't there be only one value for FP and FN (you get for FP array [83, 76])? I got little lost when calculating FP, FN, TP, TN. I understood all before this part. Explanations are really good. I am new to ML.

lexxx
Автор

Such a wonderful video. great way of explaining logistic regression starting from the data pre-processing step till the end.
Do you have any video on ways to showcase the result of logistic regression on Power BI?

divyarajans
Автор

One of the best videos on the application of Logistic Regression. Thanks for sharing! Do you have any recommendations on how to deal with imbalanced data?

svineetharavi
Автор

Great tutorial, does anyone know how we can quickly get a prediction for one row, using the trained model, in the terminal ?

shassan
Автор

Very nice, well presented and illustrated. It will also be good if you had the codes somewhere like in github.

MadhuranandaPahar
Автор

what a great explanation, but i have one question I think for p_pred we should use X_test not X_train
y_pred =log_reg.predict(X_test).
correct me if I am wrong

mohammedameen
Автор

Really great video - very clear, conceptual and very practical. Thank you very much.
I have a question though on the at the end of this video.
- I have a secondary data set (from CRM system for example) to which I have fitted the model and found the different parameters.
- Of course, there are training sets and validation sets.
Now, if I have a new dataset captured from the customer database which was never trained on before and I want to predict the classification (lets say bad load or good loan), which part of the previous code shown in the video series should be retained and how should the new dataset be passed onto the program? Any hint please?

PS - I went through the comments and I think my question is related to the post from
"darrencr1987" 8 months ago to which you answered but somehow its very summarized and not in detail.
Extract from your answer: "....You will have to automate a notebook that takes new data and feeds it into your already existing model, then save the results in a database and then send the results from a db to a visualization tool. If you do my K-means clustering videos, I go through all this process. Glad you are learning!"

sujitacharya
Автор

Great video, could you please share the code and dataset

Mishterry
Автор

Thanks for the videos, I completed all 3 of them and learnt a lot! I build logistic regression in SAS base, and I have a few questions for you:
1. In your example, your final model contains 40 variables, what if I want to reduce that number to around 10? In SAS, I can select the top 10 or 8 variables based on their wald chi-square statistic, is there anything similar in python, sklearn?
2. You tuned the c parameter in sklearn, which I found very useful. However, I've never seen this kind of hyperparameters in SAS environment, are you familiar with SAS so you can explain the reason? My guess would be SAS don't provide this kind of tuning so everything being used there is some default setting.
3. You didn't mention AUC or KS which is, according to what I've learnt before, some of the most important performance metrics of a logistic regression model. I know there is a way to produce that in sklearn, could you explain the reason why you didn't do that?
4. How do you show your final model in python, in a formula? I know you can show all the coefficients you calculated, and you have all your variables in your training data, do you have to manually combine them together to show the final regression formula, or there is a better way to do this?
Again, thank you very much and I've learnt so much from you out of these videos!

darrencr
Автор

Absolutely fantastic tutorial, so far the best i have come across!!

However, I came across something strange!

I have created my own notebook, and I am practicing as you are teaching, however, I only copied the plot_confusion_matrix code to my notebook, when I ran the code I got the error 'tuple' object is not callable. I checked using isinstance that the plot_confusion_matrix function is a tuple object, i deleted the code and recopied the code and the second time it was not a tuple object and I could plot the confusion matrix successfully, I find this very strange, although I am new to Python and programming in general so a lot of things seem strange :D . Why do you think this happened?

sanjeetmohanty