Skip to main content

Posts

Showing posts with the label logistic regression sklearn

Logistic Regression, Maths behind it and where to use it

  Logistic Regression: Logistic regression is a classification algorithm used to determine the values for the discrete classes. Unlike the linear regression which usually outputs the continuous value, the logistic regression uses sigmoid function and it will output the probability which will then mapped to the two or more classes. There can be two types of logistic regression possible which are: Binary:  (having two classes) Multi-variable:  (having more than two) First of all, let us understand the binary logistic regression and then it will be too easy to grasp what is multi-variable logistic regression. Binary Logistic Regression: As notified that n a me binary, so we will trade with the two classes primarily, we will just determine the probabilities and based upon some rule we will determine which class it belongs to mostly we will do like if p(x) > 0.5 then 1st class else 0th class. So we will decide the class like this simply. For predicting the probability we wi...