Logistic Regression Project: Cancer Prediction with Python

Sdílet
Vložit
  • čas přidán 25. 07. 2024
  • In this tutorial, we will walk you through a hands-on project using logistic regression for breast cancer prediction. We will be using a breast cancer dataset to build a logistic regression model that accurately predicts if a cancer is malignant or not based on certain measurements. This tutorial is perfect for beginners in machine learning and data science who want to learn how to build a logistic regression model from scratch using Python and the Scikit Learn library.
    -----------------
    LINKS
    👉 Here is all the code in the tutorial: www.kaggle.com/code/alexandre...
    👉 Here is the dataset: www.kaggle.com/datasets/uciml...
    💬 Join the Discord Help Server - link.alejandro-ao.com/HrFKZn
    ❤️ Buy me a coffee... or a beer (thanks): link.alejandro-ao.com/l83gNq
    ✉️ Join the mail list: link.alejandro-ao.com/AIIguB
    ----------------
    In this video tutorial, you will learn about binary logistic regression, logistic regression models, and how to build one for a data science project. You will also get an example of a data science project that will help you understand the process of how these models work mathematically. We will be using a Jupyter Notebook for our coding exercises, and we'll provide you with all the necessary code and explanations to help you follow along.
    Whether you're a data science beginner or looking for ideas for data science projects, this tutorial will give you a comprehensive overview of logistic regression and how to apply it to a real-life problem. By the end of this video, you will have a solid understanding of logistic regression and be able to apply it to your own data science projects.
    Keywords: logistic regression, machine learning, python, logistic regression machine learning, logistic regression model, binary logistic regression, logistic regression example, data science project, data science project from scratch, data science project ideas, data science projects for beginners, data science, data science projects, Scikit Learn, Jupyter Notebook.
    Timestamps ⏰
    00:00 Intro
    01:05 How the model works
    02:30 Background on Linear Regression
    06:50 Intuition behind Logistic Regression
    10:07 Presentation of the dataset
    12:25 Import dependencies and data
    15:18 Clean the data
    23:05 Separate predictors and target
    25:33 Normalize the data
    30:30 Split data into Test and Train sets
    34:13 Train the model and make predictions
    37:54 Evaluation of the model
    41:17 Conclusion
    #datascience #machinelearning #scikitlearn #python #artificialintelligence #logisticregression

Komentáře • 25

  • @alejandro_ao
    @alejandro_ao  Před 5 měsíci +1

    💬 Join the Discord Help Server: link.alejandro-ao.com/981ypA
    ❤ Buy me a coffee (thanks): link.alejandro-ao.com/YR8Fkw
    ✉ Join the mail list: link.alejandro-ao.com/o6TJUl

  • @ayoajayi280
    @ayoajayi280 Před 7 měsíci +1

    This video is highly educative. I wish he explains other ML algorithms in future videos. Thanks so much.

  • @sasuke95014
    @sasuke95014 Před 11 měsíci

    Great video. Thank you.

  • @dazai6861
    @dazai6861 Před rokem

    A standard scaler 30:00 transformers your values into a range of (-3 ; +3)
    Thank u for the video.

  • @majydenam9423
    @majydenam9423 Před 3 měsíci

    Great work ...Thanks

  • @ahmeddiaa5182
    @ahmeddiaa5182 Před 10 dny

    Hello, great video
    just one comment is at 22:04 the reason it's recommended to convert it into a categorical type is that python/the model will treat it inherently as an int type which indicates that one is larger or greater than the other 1 > 0 which is not what we're looking for we want the model to treat it as if 1 is a yes and 0 is a no basically otherwise great content and i hope this helps

  • @for-ever-22
    @for-ever-22 Před rokem

    This is one of the best videos on data science and I have seen a lot . Thank you for this. Please keep posting

    • @emekaejike15
      @emekaejike15 Před měsícem

      I think its because the X variables are what we need for our predictions. The Y variable is just a result of the X variables

  • @edmashokmusic1692
    @edmashokmusic1692 Před měsícem +1

    this is the best tutorial i have ever watched. thanks a lot man. And
    Instead of train, test. is there any benefit of using train, validation, test?

  • @RaihanRisad
    @RaihanRisad Před 3 měsíci

    informative and useful, you should make it a video on how to deploy it using flask or any other thing

  • @arthurcwlau9307
    @arthurcwlau9307 Před 9 měsíci +1

    Great teaching! I am new to Python and ML and am learning a lot!
    How to handle if the predictor is categorical in nature, e.g. some Yes/No or 0/1 of something, but not a number/measurement. Can the logistic regression model handle that?

  • @mellowbeatz93
    @mellowbeatz93 Před 7 měsíci

    unbelievable I learned a lot from you!!! Thank you so much!
    Cant wait to check your new tutorials, truly the best channel for beginners who wants to deep dive into AI!
    Is it possible that you can make a tutorial how to build an API around it or even how how to deploy it with e.g. Flask? (as you stated it in your conclusion)

  • @tejaspatel2212
    @tejaspatel2212 Před 10 měsíci

    Best video i have seen.. such an amazing explaination. can you please come up with more ml projects instead of langchain?

  • @lasithdissanayake
    @lasithdissanayake Před 21 dnem

    Great explainations, clear instructions and great work. I wish you could do more projects on other ML models as well. That would be really helpful. Thanks for this content man.

    • @alejandro_ao
      @alejandro_ao  Před 21 dnem +1

      it's my pleasure, mate. i am have been focusing much more on genai recently, but i'll try to make more regular ml content too!

    • @lasithdissanayake
      @lasithdissanayake Před 21 dnem

      @@alejandro_ao thanks. I clarified a lot with your 2 videos of linear regression and logiatic regreasion. Thats why. Anyway, talking about genAI. Can you help with building a chatPDF app using a free LLM like groq

    • @alejandro_ao
      @alejandro_ao  Před 20 dny +1

      @@lasithdissanayake that's great to hear! absolutely, that is coming up very, very soon actually. i just need to finish putting together a course in genai that i will release in the next few weeks. but i should be able to put out that video within a couple of weeks 😎

    • @lasithdissanayake
      @lasithdissanayake Před 20 dny

      @@alejandro_ao great buddy. Thanks for the amazing content. Love from Sri Lanka ❤

  • @prisharai792
    @prisharai792 Před 3 dny

    thank you brother

  • @admonitoring-pi9os
    @admonitoring-pi9os Před měsícem

    thanks

  • @ayoajayi280
    @ayoajayi280 Před 6 měsíci

    Great video. But I have a question. While wasn't the y variable normalized. Only the x variables were normalized?

    • @espinozagarciafelipekaleb9881
      @espinozagarciafelipekaleb9881 Před měsícem

      The Y variable is our target variable, so we have to be careful in not changing it's values because if we change them we can change the entire purpose of the model. Also, we normalize the independent variables to avoid "confusing" our model with a magnitude bias, the bigger the magnitude of the variable compared to the other, the bigger the bias in the training of the model so that's why we normalize, but for the target variable there is no need to normalize because the model Will predict the value, in this case 0 or 1, if we normalize the model would predict something different and to the length of my knowledge I don't think that we can interpret that correctly just yet (Sorry for the bad English) greetings from mexico ✌🏻

  • @shivammehra3217
    @shivammehra3217 Před 8 dny

    Isn't you had to first split the data then normalized? the way you did would cause data leakage.