Current location: Home > python > Artificial Intelligence Full Course _ Artificial Intelligence Tutorial for Beginners _ Edureka [DownSub.com](1).txt - Ep14 Text
Artificial Intelligence Full Course _ Artificial Intelligence Tutorial for Beginners _ Edureka [DownSub.com](1).txt - Ep14
Time: 2025-07-11 13:31:25 Source: DevLabChain Author: html Reading: 904 times
make use of logistic regressionso understand that linear regression wasused to predict continuous quantitiesand logistic regression is jay z 2025 updateused topredict categorical quantities okay nowone major confusion that everybody hasis people keep asking me why is logisticregression called logistic regressionwhen it is used for classification thereason it is named logistic regressionis because its primary technique is verysimilar to linear regression okaythere's no other reason behind thenaming it belongs to the general linearmodels okay it belongs to the same classas linear regression but there's noother reason behind the name logisticregression logistic regression is mainlyused for classification purpose becausehere you'll have to predict a dependentvariable which is categorical in natureright so this is mainly used forclassification so to Define logisticregression for you logistic regressionis a method used to predict a dependentvariable y given an independent variableX such that the dependent variable iscategorical meaning that your output isa categorical variable so obviously thisis a classification algorithm so guysagain to clear your confusion when I saycategorical variable I mean that it canhold values like 1 or zero yes or notrue or false and so on right sobasically in logistic regression theoutcome is alwayscategorical now how does logisticregression work so guys before I tellyou how logistic regression Works take alook at this graph now I told you thatthe outcome in a logistic regression iscategorical right your outcome willeither be zero or one or it'll be aprobability that ranges between 0o andone so that's why we have this S curvenow some of you might think that why dowe have an S curve right we can'tobviously have a straight line we havesomething known as a sigmoid curvebecause we can have values rangingbetween 0er and one which will basicallyshow the probability so maybe youroutput will be0.7 right which is a probability valueif it is 0.7 it means that your outcomeis basically one so that's why we havethis sigmoid curve like this okay nowI'll explain more about this in depth ina while now in order to understand howlogistic regression works first let'stake a look at the linear regressionequation right this was the linearregression equation that we discussed yhere stands for the dependent variablethat needs to be predicted beta KN isnothing but the Y intercept beta 1 isnothing but the slope and X representsthe independent variable that is used topredict y right e denotes the error inthe computation so given the fact that Xis the independent variable and Y is thedependent variable how can we representa relationship between X and Y such thaty ranges only between 0 and 1 here thisvalue basically denotes probability of yequal to 1 given some value of x so herebasically this PR denotes probabilityand this value basically denotes thatthe probability of y equal to 1 givensome value of x right this is what weneed to find out now if you want tocalculate the probability using thelinear regression model then theprobability will look something like Pof x equal to Beta plus beta 1 into Xright P of X will be equal to Beta plusbeta 1 into X where P of X is nothingbut your probability of getting y equalto 1 given some value of x so thelogistic regression equation is derivedfrom the same equation except we need tomake a few alterations because theoutput is only categorical all right sologistic regression does not necessarilycalculate the outcome as zero or oneright I mentioned this before onlyinstead it calculates the probability ofa variable falling in the class zero orclass one so that's why we can concludethat the resultant variable must must bepositive and it should lie between 0 and1 which means that it must be less thanone right so to meet these conditions wehave to do two things first we can takethe exponent of the equation becausetaking an exponential of any value willmake sure that you get a positive numbercorrect secondly you have to make surethat your output is less than one rightso a number divided by itself + one willalways be less than one so that's how weget this formula First We Take theexponent of the equation beta + beta 1 +x and then we divide it by that numberplus one so this is how we get thisformula now the next step is tocalculate something known as the logitfunction now the logic function isnothing but it is a link function thatis represented as an S curve or as asigmoid curve that ranges between theValu 0 and 1 right it basicallycalculates the probability of the outputvariable so if you look at this equationit's quite simple what we have done hereis we just cross multiply and take e tothe^ Beta plus beta 1 into X as commonright the rhs denotes the linearequation for the independent variablesthe LHS represents the odd ratio so ifyou compute this entire thing you'll getthis final value which is basically yourlogistic regression equation your rhshere denotes the linear equation forindependent variables and your LHSrepresents the odd ratio which is alsoknown as the logit function so I toldyou that logit function is basically afunction that represents an S curve thatranges between 0 and one right this willmake sure that our value ranges between0 and one so in logistic regression onincreasing this x by one measure itchanges the loged by a factor of beta KNis the same thing as I showed you inlinear regression so guys that's how youderive the logistic regression equationso if you have any doubts regardingthese equations please leave them in thecomment section and I'll get back to youand I'll clear the doubts right so toSummit up logistic regression is usedfor classification the output variablewill always be a categorical variable wealso saw how you derived at the logisticregression equation right and one moreimportant thing is that the relationshipbetween the variables in a logisticregression is denoted as an S curvewhich is also known as a sigmoid curveand also the outcome does notnecessarily have to be calculated aszero or one it can be calculated as aprobability that the output lies inclass one or class zero right so youroutput can be a probability rangingbetween 0o and one that's why we
(Editor in charge: news)
Latest content
- ·Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep163
- ·Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep72
- ·Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep87
- ·GenAI Essentials – Full Course for Beginners - Ep122
- ·GenAI Essentials – Full Course for Beginners - Ep163
- ·GenAI Essentials – Full Course for Beginners - Ep162
- ·GenAI Essentials – Full Course for Beginners - Ep97
- ·GenAI Essentials – Full Course for Beginners - Ep166
- ·GenAI Essentials – Full Course for Beginners - Ep56
- ·Trailblazing women and their journeys to space - Ep11
Hot content
- ·GenAI Essentials – Full Course for Beginners - Ep145
- ·Godfather of AI_ I Tried to Warn Them, But We’ve Already Lost Control! Geoffrey Hinton - Ep9
- ·GenAI Essentials – Full Course for Beginners - Ep78
- ·Artificial Intelligence Full Course _ Artificial Intelligence Tutorial for Beginners _ Edureka - Ep10
- ·Solana Developer Bootcamp 2024 - Learn Blockchain and Full Stack Web3 Development - Projects 1-9 - Ep1
- ·GenAI Essentials – Full Course for Beginners - Ep76
- ·Bloodhound Q50 Tells His Life Story (Full Interview) - Ep3
- ·Bloodhound Q50 Tells His Life Story (Full Interview) - Ep1
- ·GenAI Essentials – Full Course for Beginners - Ep95
- ·Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep138