Machine Learning Tutorial Python - 8: Logistic Regression (Binary Classification)

Logistic regression is used for classification problems in machine learning. This tutorial will show you how to use sklearn logisticregression class to solve binary classification problem to predict if a customer would buy a life insurance. At the end we have an interesting exercise for you to solve.
Usually there are two types of machine learning problems (1) Linear regression where prediction value is continuous (2) Classification where predicted value is categorical. Logistic regression is used for classification problems mainly.
#MachineLearning #PythonMachineLearning #MachineLearningTutorial #Python #PythonTutorial #PythonTraining #MachineLearningCource #LogisticRegression #sklearntutorials #scikitlearntutorials
Code: github.com/codebasics/py/blob...
Exercise: Open above notebook from github and go to the end.
Exercise solution: github.com/codebasics/py/blob...
Topics that are covered in this Video:
0:00 - Theory (Explain difference between logic regression and classification)
1:18 - What is logistic regression?
1:26 - Classification types (Binary vs multiclass classification)
1:53 - Explanation of logistic regression using the example of if person will buy insurance based on his age
5:38 - Sigmoid or Logit function
8:18 - Coding (for coding we are using an example of if a person will buy insurance or not based on his age)
14:36 - sklearn predict_proba() function
15:49 - Exercise (Solve a problem of predicting employee retention based on salary, distance to work, promotion, department etc)
Do you want to learn technology from me? Check codebasics.io/ for my affordable video courses.
Next Video:
Machine Learning Tutorial Python - 8 Logistic Regression (Multiclass Classification): • Machine Learning Tutor...
Populor Playlist:
Data Science Full Course: • Data Science Full Cour...
Data Science Project: • Machine Learning & Dat...
Machine learning tutorials: • Machine Learning Tutor...
Pandas: • Python Pandas Tutorial...
matplotlib: • Matplotlib Tutorial 1 ...
Python: • Why Should You Learn P...
Jupyter Notebook: • What is Jupyter Notebo...
Tools and Libraries:
Scikit learn tutorials
Sklearn tutorials
Machine learning with scikit learn tutorials
Machine learning with sklearn tutorials
To download csv and code for all tutorials: go to github.com/codebasics/py, click on a green button to clone or download the entire repository and then go to relevant folder to get access to that specific file.
🌎 My Website For Video Courses: codebasics.io/?...
Need help building software or data analytics and AI solutions? My company www.atliq.com/ can help. Click on the Contact button on that website.
#️⃣ Social Media #️⃣
🔗 Discord: / discord
📸 Dhaval's Personal Instagram: / dhavalsays
📸 Codebasics Instagram: / codebasicshub
🔊 Facebook: / codebasicshub
📱 Twitter: / codebasicshub
📝 Linkedin (Personal): / dhavalsays
📝 Linkedin (Codebasics): / codebasics
🔗 Patreon: www.patreon.com/codebasics?fa...

Пікірлер: 607

  • @codebasics
    @codebasics2 жыл бұрын

    Check out our premium machine learning course with 2 Industry projects: codebasics.io/courses/machine-learning-for-data-science-beginners-to-advanced

  • @codebasics
    @codebasics4 жыл бұрын

    Step by step roadmap to learn data science in 6 months: kzread.info/dash/bejne/emiNxdOOfLyXXbQ.html How to learn coding for beginners | Learn coding for free: kzread.info/dash/bejne/daSo1M6ydJOyeps.html 5 FREE data science projects for your resume with code: kzread.info/dash/bejne/a2lryLN8nZjHdNI.html

  • @hanselsamuel

    @hanselsamuel

    3 жыл бұрын

    I really appreciate your tutorial videos, thank you. But how to find the "bought_insurance" values ?

  • @interesting_vdos
    @interesting_vdos2 жыл бұрын

    I have never seen any other video explaining the concepts of machine learning so clearly. Keep up the great work..!!

  • @pamp3657
    @pamp3657 Жыл бұрын

    One of the few videos that clearly shows the training data that the model is attempting to fit to. Thank you.

  • @ansh6848
    @ansh68482 жыл бұрын

    Best course you can get for learning ML is this only. Explanation is super awesome. Actually most of the books and courses shows you complex looking mathematical equations but this guy made all that easy for us.

  • @MoreBalaji
    @MoreBalaji2 жыл бұрын

    Perfectly balanced video. It forces anyone to continue to watch other videos of this series. Very well explained in simple language. 👌

  • @bhawin101283
    @bhawin1012835 жыл бұрын

    Perfect explanation with proper examples. Great job.

  • @anand.prasad502

    @anand.prasad502

    4 жыл бұрын

    medium.com/trainyourbrain/would-you-read-this-article-or-not-b757d0e26cf8

  • @Sarah-st7jp
    @Sarah-st7jp2 жыл бұрын

    Sir, I know so surely that I can bank on your data science and python videos when I need to gain an in-depth understanding. Your content gives me the hope and clarity that I needed. God bless you and your undying passion to make such useful content for us. Thank you so much for all your hard-work sir!!! :)

  • @codebasics
    @codebasics4 жыл бұрын

    Solution link for the exercise: github.com/codebasics/py/blob/master/ML/7_logistic_reg/Exercise/7_logistic_regression_exercise.ipynb Step by step guide on how to learn data science for free: kzread.info/dash/bejne/iKKTz8-IpbTRg6Q.html Machine learning tutorials with exercises: kzread.info/dash/bejne/maGq2MOoktCdlbQ.html

  • @shivangitomar5557
    @shivangitomar55574 жыл бұрын

    You are the best teacher! I love the exercises at the end of each topic, which strengthens our understanding of what we learnt!!! Thank you so much! :)

  • @codebasics

    @codebasics

    4 жыл бұрын

    I am glad it was helpful. :)

  • @mehmetkaya4330
    @mehmetkaya43305 жыл бұрын

    Thank you again! Great explanation! Always great tutorials!

  • @abhishekdobliyal7178
    @abhishekdobliyal71784 жыл бұрын

    Thank You Sir, I have learned a lot from your vids :). I was really perplexed by Logistic Regression and I am glad KZread recommended this to me :)

  • @zestful14
    @zestful144 жыл бұрын

    This video is fantastic. I'm teaching myself machine learning and this was one of the most helpful resources I've found online. Excited to watch/work-through the rest of the videos! Thank you so much

  • @anand.prasad502

    @anand.prasad502

    4 жыл бұрын

    medium.com/trainyourbrain/would-you-read-this-article-or-not-b757d0e26cf8

  • @sidduhedaginal
    @sidduhedaginal4 жыл бұрын

    Finally i got perfect trainer for ML, your skills are excellence sir, we are very proud of you sir.

  • @codebasics

    @codebasics

    4 жыл бұрын

    Glad you liked it :)

  • @matinpathan5186

    @matinpathan5186

    3 жыл бұрын

    Yes is good but if you like his tutorials then tell your friend to subscribe his channel and hit the like button... that we can do from our side

  • @shreyasb.s3819
    @shreyasb.s3819 Жыл бұрын

    I never seen anyone explaining simple as like this. Others making complicated like maths intuition. Thanks code basics

  • @flyingsalmon
    @flyingsalmon2 жыл бұрын

    I love your tutorials. They're perfectly paced, with right amount of context and explanation, great examples, and patient but efficient delivery. I hope you continue to produce more. Subscribed here and also Liked all of the videos I've found so far from you. Best.

  • @codebasics

    @codebasics

    2 жыл бұрын

    👍🤗

  • @fahadreda3060
    @fahadreda30605 жыл бұрын

    Another Great Tutorial, Thank you sir, Waiting for the next tutorial, keep up the good work

  • @zerostudy7508
    @zerostudy75085 жыл бұрын

    i'm Not afraid to learn things with complicated term anymore! this teacher is the best at explanation.

  • @zerostudy7508

    @zerostudy7508

    5 жыл бұрын

    @@codebasics You are good at it. I thank you.

  • @GeorgeTrialonis
    @GeorgeTrialonis4 жыл бұрын

    Thank you very much for the videos on ML, AI, Python, etc. They help me learn a lot. Your explanations are clear and well understood. Thanks.

  • @codebasics

    @codebasics

    4 жыл бұрын

    George I am glad 😊

  • @mponcardas94
    @mponcardas945 жыл бұрын

    I love your series of videos as you are concerned with the student's learning! Thanks!

  • @nguyentuanhung3858
    @nguyentuanhung38587 ай бұрын

    Started learning machine learning on your youtube. Absolute Masterclass , you are my real teacher sir!!!

  • @user-ee6nk8sc3t
    @user-ee6nk8sc3tАй бұрын

    You make people feel so welcomed to data field with your teaching skills. You are always the best.

  • @Hari983
    @Hari9832 жыл бұрын

    Very well done and explained even for beginners - thank you so much!

  • @imaansarwar2314
    @imaansarwar23142 жыл бұрын

    thank you so much ! you have helped alot in learning the algorithms. Saved time with such a quick and easy way of explaining as I didn't have time for my fyp compleion and these videos are saving my time to get an idea of all algorihtms

  • @khalidhasan1793
    @khalidhasan1793 Жыл бұрын

    I paused the video and commented, it's an excellent series that begins with ML.

  • @saranyachimirala8351
    @saranyachimirala83513 жыл бұрын

    This video had good information, it was really helpful. I am still a learner, new to this field. I understand how to write and basics of confusion matrix using binary classification. But some terminologies are confusing. Can you please explain what exactly are base rate, test incidence, conditional incidence, classification incidence? That would be appreciated.

  • @pagnonig
    @pagnonig4 жыл бұрын

    Your videos are awesome. I'm learning so much!

  • @riyamitra8901
    @riyamitra89012 жыл бұрын

    For the first time after so many courses, videos, whitepapers, github, kaggle, exercises, wiki pages I am genuinely enjoying Machine Learning and I am doing all the coding and exercises by myself obviously after learning and understanding it all. Thanks a lot!!!

  • @codebasics

    @codebasics

    2 жыл бұрын

    Glad you like them Riya and I wish you all the best! I have many playlists and recently left my job to focus on online teaching. My goal is to produce even a better quality tutorials then this.

  • @riyamitra8901

    @riyamitra8901

    2 жыл бұрын

    @@codebasics I am trying to follow all of your videos to improve in my career. I am trying to get a job with a clear concept.

  • @riyamitra8901

    @riyamitra8901

    2 жыл бұрын

    @@codebasics One question here. Why we did not remove one of the dummy variable after dropping salary column in Logistic regression like we did for Linear?

  • @09_samarpanbasu7

    @09_samarpanbasu7

    Жыл бұрын

    @@riyamitra8901 I think ...as logistic regression can handle multicollinearity between the dummy variables so it's not necessary to drop the last col.

  • @prakritreeeeeee
    @prakritreeeeeee2 жыл бұрын

    Thank you so much for the graphical explanation...the concepts are crystal clear in my mind now.

  • @ihasbaoui
    @ihasbaoui3 жыл бұрын

    Thank you, now if you have many features in your binary classification problem, and the classes overlap from visualizing data using pca, is it advisable to use Logistic Regression in this case?

  • @pratikghute2343
    @pratikghute2343 Жыл бұрын

    I have no other words to say, the comments done by others have already conveyed my message to you!, Lots of love and thank you !

  • @balasubramanian5232
    @balasubramanian52324 жыл бұрын

    Sir Kindly confirm whether you already have a video for how to do Exploratory data analysis and feature selection. Thank you.

  • @PollyMwangi-cp3jn
    @PollyMwangi-cp3jn4 ай бұрын

    Actually, I fine tuned my model and was able to achieve an accuracy of 1.0. Thankyou so much sir. This might just be the best channel I have seen.🥳

  • @kibs_neville

    @kibs_neville

    4 ай бұрын

    Hi, I have some slight problem. How can I plot the prediction curve after training my model? Would be glad if you reply. Thanks

  • @anishagarwal71

    @anishagarwal71

    Ай бұрын

    Could you pls tell me what exactly did you do to fine tune it?

  • @shubhamjain6277
    @shubhamjain62774 жыл бұрын

    sir I have got an error "too many values to unpack" at 11:24,please help me to resolve this issue.

  • @barakatosalon
    @barakatosalon5 жыл бұрын

    Great Class, you are the best of the best !!!

  • @adishvakharia3559
    @adishvakharia35594 жыл бұрын

    Detailed and really helpful. Thank you.

  • @sunnyveerpratapsingh1102
    @sunnyveerpratapsingh11024 жыл бұрын

    bro you are best .. tried to swirl thru other online videos and then I end up watching your videos and I understand better .

  • @codebasics

    @codebasics

    4 жыл бұрын

    Sunnny Singh, I am happy this was helpful to you

  • @rutvikkumbhar6736

    @rutvikkumbhar6736

    11 ай бұрын

    Any update you can give how's your data science journey is going as I am aspiring to be a data scientist..

  • @krishkonnect814
    @krishkonnect8144 жыл бұрын

    one question though in the exercise given of employee retention why did not you dummify the dept variable and included in the features, cannot it be one of the important features which we should be including coz I have included it and got better score as well.

  • @piyushjha8888
    @piyushjha88884 жыл бұрын

    78 percent accuracy. I do all your exercises but in this I learned a lot. Thank you sir for such a great series @codebasics

  • @kalaipradeep2753

    @kalaipradeep2753

    10 ай бұрын

    Hi bro....

  • @kalaipradeep2753

    @kalaipradeep2753

    10 ай бұрын

    Now I learn machine learning.... Now What are you doing. I mean study or work

  • @piyushjha8888

    @piyushjha8888

    10 ай бұрын

    I work in a bank as a software engineer. This channel is a gem as this explains the ML concept in laymen terms. I was able to give most of the answers related to ML because of codebasics and deep learning Andrew Ng course

  • @Sparshchokra
    @Sparshchokra5 жыл бұрын

    Hi, i found your course is truly enhancing the path towards Machine Learning concepts, kindly continue this and sir achieve a complete set of this machine learning course including all the kick start algorithms. Thanks Sparsh

  • @codebasics

    @codebasics

    5 жыл бұрын

    Thanks for appreciation Sparsh. I am continuing the series, it is just that due to my schedule I am not finding lot of time to work on it but I will try my best to speed up new tutorial additions.

  • @nilupulperera
    @nilupulperera4 жыл бұрын

    Dear Sir What a beautiful datasheet you have provided for practice with this video. Spent more than two days to play with it. Playing with the datasheet opened another dimension of the learning curve. Thank you very much for providing relevant exercises like this as a challenge!

  • @codebasics

    @codebasics

    4 жыл бұрын

    Happy that this is helping you Nilupul.

  • @VyNguyen-xy3il
    @VyNguyen-xy3il Жыл бұрын

    Sir, I extremely appreciate your videos and efforts in teaching these things. Very helpful and great explanation!!

  • @chrismagee5845
    @chrismagee5845 Жыл бұрын

    Exactly what I was looking for, Thank You!

  • @bandhammanikanta1664
    @bandhammanikanta16644 жыл бұрын

    Perfect explanation on logistic regression. Loved it. Thanks a lot.

  • @anand.prasad502

    @anand.prasad502

    4 жыл бұрын

    medium.com/trainyourbrain/would-you-read-this-article-or-not-b757d0e26cf8

  • @abdulmuzakir
    @abdulmuzakir3 жыл бұрын

    Thanks, sir .. your explanation is really clear and so easy to understand 👍🏼

  • @guneyfatma
    @guneyfatma9 ай бұрын

    Thnaks a lot for theese amazing contents. I have just discovered your videos!

  • @phaniauce
    @phaniauce4 жыл бұрын

    Awesome explanation. I like this practical math and algorithmic explanation.

  • @noorameera26
    @noorameera263 жыл бұрын

    This video is really really good. Love the way you teach, your pacing and all the things you mentioned are really useful. Thank u and may god bless u!

  • @codebasics

    @codebasics

    3 жыл бұрын

    Glad it was helpful!

  • @JainmiahSk
    @JainmiahSk5 жыл бұрын

    Building model means statistic formula will be the same but we use different columns of Data Frame for an output. Is it right sir?

  • @mapa5000
    @mapa5000 Жыл бұрын

    Thank you very much ! Your videos are always my best choice to learn ML

  • @codinghighlightswithsadra7343
    @codinghighlightswithsadra7343 Жыл бұрын

    Thanks a bunch, Subscribed here and also Liked all of the videos I've found so far from you. Best.

  • @ridael-mehdawe4681
    @ridael-mehdawe46814 жыл бұрын

    among several videos, this one is the best. appreciated

  • @codebasics

    @codebasics

    4 жыл бұрын

    Rida, I am glad 😊

  • @fahimshahriar3793
    @fahimshahriar37934 жыл бұрын

    sir, in your given exercise can we drop the independent variable by backward elimination process ??

  • @zaidzeee
    @zaidzeee4 жыл бұрын

    this video really really very helpful. thank you so much for this amazing kwnldge please make more video request.

  • @manusingh9007
    @manusingh90074 жыл бұрын

    On first attempt, i considered 'left' as dependent variable and everything else including salary and department as independent variable, got 77% score of accuracy. Thanks for the wonderful video.

  • @codebasics

    @codebasics

    4 жыл бұрын

    Great job manu. its a good score. Video description has a solution link, you can verify your code with mine.

  • @ayushpant6190
    @ayushpant61903 жыл бұрын

    I have a question, how is the slope value updated for logistic regression when finding the best fit plane or line to seperate the 2 classes? At first I thought gradient descent but that doesn't work because it is used to find the global minima

  • @ojassaxena2891

    @ojassaxena2891

    2 жыл бұрын

    Maaeri aapahi hans di Maaeri aapahi rondi Maaeri yaad yaad wo aaeri

  • @danielnderitu5886
    @danielnderitu58862 жыл бұрын

    I like your tutorials very much, the explanation therein is superb and makes one understand even very hard to grasp concepts.

  • @swaruppanda2842
    @swaruppanda28425 жыл бұрын

    Suppose our target variable is in the form of categorical such as Yes & No. Then do we need to convert it as 1 & 0? Also, can we have a mixture of independent variable as categorical(string) and continous(numerical)?

  • @Christian-mn8dh
    @Christian-mn8dh5 жыл бұрын

    just subscribed, your very good at explaining. thank you!

  • @codebasics

    @codebasics

    5 жыл бұрын

    I am glad you liked it Pablo

  • @mkoc9253
    @mkoc92535 жыл бұрын

    Keşke türkçe altyazı da ekleseydiniz çok mutlu olurduk.Yine de elinize sağlık.

  • @linujose2536
    @linujose25365 жыл бұрын

    amazing tutorial!

  • @DataThinkers
    @DataThinkers5 жыл бұрын

    Nice Sir, try to create SVM or PCA next with some mathematical explanation. thank you

  • @MultiSpiros123
    @MultiSpiros1235 жыл бұрын

    Thanks one of the best tutorials !

  • @codebasics

    @codebasics

    5 жыл бұрын

    Glad you liked it

  • @shivatarun9125
    @shivatarun91255 жыл бұрын

    awesome.... :) Sir, could you please make a video on how to detect and handle/dealing with outliers in model..? eagerly awaiting from you, haven't got any clarity on outliers.

  • @paramjeetgill1558
    @paramjeetgill15585 жыл бұрын

    Very nice and you present easiest way to understand. Thank you

  • @pallabsaha4098
    @pallabsaha40985 жыл бұрын

    thank you sir for your video.

  • @adityabikramarandhara9477
    @adityabikramarandhara94772 жыл бұрын

    Thanks a lot for the lucid explanation. In the exercise, I got an accuracy of 77.2% in my model prediction.

  • @kalaipradeep2753

    @kalaipradeep2753

    10 ай бұрын

    Hi bro... Now I learn machine learning... What are you doing.... I mean study or work

  • @0xN1nja
    @0xN1nja2 жыл бұрын

    one of the best explanation I've ever seen

  • @sundayagu2078
    @sundayagu20783 жыл бұрын

    God bless you and may He provide angles to solve all your problems. Thank you

  • @shuaibalghazali3405
    @shuaibalghazali34058 ай бұрын

    Thanks a lot for this i was able to implement logistic regression after so many tutorials

  • @hihi7896
    @hihi78962 жыл бұрын

    Hi, thank you for the super helpful video, I wanna ask why in the solution, you didn't drop 1 dummy variable (i.e drop medium and leave high and low) ?

  • @tayfundogruer8026
    @tayfundogruer802610 ай бұрын

    Bro it was easy and clean. Thanks!

  • @micro_Dots
    @micro_Dots2 жыл бұрын

    clearly understandable explanation. Thank you so much.

  • @boughrood
    @boughrood10 ай бұрын

    Very interesting and useful - well presented too

  • @krishkonnect814
    @krishkonnect8144 жыл бұрын

    Thankyou very much for all help and support. Can you please make a video on mathematical explanation of sigmoid and logit function also ?

  • @siddhantkaushik4606
    @siddhantkaushik46063 жыл бұрын

    amazing. astounding. bewildering. breathtaking. extraordinary. impressive. marvelous. miraculous. even all these adjectives are less to tell the quality of the video. Thanks a million.

  • @codebasics

    @codebasics

    3 жыл бұрын

    ha ha .. nice. you made my day with this shower of praise Siddhant. Thank you for your kind words :)

  • @roshangeorge97
    @roshangeorge97 Жыл бұрын

    thank you for the content, helped me a lot!

  • @nehasaroha2505
    @nehasaroha25055 жыл бұрын

    A very nicely explained tutorial, thanks for sharing this. Can you please do a video on model validation techniques or guide me to some simple and intuitive online resource for the same.

  • @akhtarshaikh5594
    @akhtarshaikh55945 жыл бұрын

    excellent explanation...thanks lot.. please make video on deep learning model using tensorflow and caffe...

  • @HearterSG
    @HearterSG5 жыл бұрын

    great again! looking forward to your future videos!

  • @hemanthpeddi4129
    @hemanthpeddi41294 жыл бұрын

    what is penalty=l2 in the output 5 at 13:56 ? Can you please explain the parameters of the function

  • @kibs_neville
    @kibs_neville4 ай бұрын

    Well explained, Thanks!

  • @amanullahmahabub78
    @amanullahmahabub784 жыл бұрын

    You guys are life savers. man love your videos.

  • @codebasics

    @codebasics

    4 жыл бұрын

    Amanullah, I am happy it helped you :)

  • @tariqahassan5692
    @tariqahassan56922 ай бұрын

    it is one of the fantastic videos about Logistic Regression .. Many thanks

  • @vaishnavi4354
    @vaishnavi43544 жыл бұрын

    Hello Sir actually I have one doubt Suppose We have multiple columns in our dataset and from that we have to plot the graph using all values. So shall we give all the column names as a parameter in the scatter()method Please reply me

  • @leooel4650
    @leooel46505 жыл бұрын

    Awesome as always, thanks for everything! i got a 77% model accuracy based on the satisfaction_level

  • @jsbean8415

    @jsbean8415

    4 жыл бұрын

    How did you get the prediction model accuracy by depedent variable? And 77% meaning is the probability that they will leave the company?

  • @nxbil2397

    @nxbil2397

    4 жыл бұрын

    @@jsbean8415 model.score()

  • @jsbean8415

    @jsbean8415

    4 жыл бұрын

    @@nxbil2397 that will show you the overal accuracy of your model. My question is , how you will get the probablity % that the employee will leave given the dependent variables? Like the one you have mentioned "satisfaction level".

  • @linusolmin9313
    @linusolmin9313Ай бұрын

    Thank you! So well done

  • @jugabrat6797
    @jugabrat67979 ай бұрын

    Your way of teaching is very good. Thanks for the video ❤❤❤

  • @namitakala393
    @namitakala3939 күн бұрын

    thankyou for making videos, your content is great

  • @mario1ua
    @mario1ua8 ай бұрын

    Great explanation, I've understood everything, thanks!

  • @codebasics

    @codebasics

    8 ай бұрын

    Glad you found it helpful!

  • @prakharsahu9498
    @prakharsahu94985 жыл бұрын

    Sir,how can we improve accuracy of model the model that I built for employee retention dataset is coming as 77%

  • @nxbil2397

    @nxbil2397

    4 жыл бұрын

    Feed the model more dataset and train it will improve accuracy

  • @dilipkumar2k6
    @dilipkumar2k62 жыл бұрын

    Great explanation. Can you please share the slides you have used? Going through slides make it faster to revise the concepts.

  • @amandaahringer7466
    @amandaahringer74662 жыл бұрын

    Very helpful!

  • @ArunSharma-is2we
    @ArunSharma-is2we4 жыл бұрын

    is this possible to have 0 and 1 both for the same age and we can compute them further based on probability?

  • @PlayingCode
    @PlayingCode2 жыл бұрын

    Hey plz tell me what to do when I have multiple Columns like age ,weight , bmi that i need to consider for prediction

  • @guneyfatma
    @guneyfatma9 ай бұрын

    Why do we write x and y arguments in split method? Is it because of syntax?

  • @laxpanwar11
    @laxpanwar1129 күн бұрын

    Thanks. It is really informative.

  • @SoHoodTwentyThree
    @SoHoodTwentyThree3 жыл бұрын

    Hi, i am working on a Bank Churners project and want to predict if a bank customer is leaving the services or not. I am asked to test a few different machine learning models and i want to know if logistic regression is suitable for a prediction model using 4 independent variables. I am thinking of using SVM and Random Forest too. What is your opinion ?

  • @michaelpeel3716
    @michaelpeel37162 жыл бұрын

    Many thanks this is the first explanation that provides context and examples making its so simple to understand.

  • @codebasics

    @codebasics

    2 жыл бұрын

    Glad you liked it Michael

  • @engihabit

    @engihabit

    2 жыл бұрын

    @@codebasics 15:35 I can’t execute it?? model.predict(57) and any number like 25, 60 got the following ValueError: Expected 2D array, got 1D array instead: array=[57].

  • @sundayhonesty5828
    @sundayhonesty58285 жыл бұрын

    Thank you Codebasicd for helping me understand Linear regression. I have question for Codebasics and everyone. please do well to answer me. thanks in advance. I want to perform a logistic regression. I was asked to use state and political party and vote gotten as my independent variable and make a prediction whether a political party wins or loses. I have 36 states in my country and i want to use 3 dominant parties i want to use as a case study. my problem is how the layout of these data will be; I am unable to resolve party been in a separate column unless I take one political party and take one state and do the prediction explicitly and then move on to another. Please i really needs you guys help to resolve these issue. Thanks in advance.