What is the difference between linear regression and logistic regression?

后端 未结 15 1352
一向
一向 2020-12-02 03:32

When we have to predict the value of a categorical (or discrete) outcome we use logistic regression. I believe we use linear regression to also predict the value of an outco

15条回答
  •  春和景丽
    2020-12-02 04:12

    The basic difference :

    Linear regression is basically a regression model which means its will give a non discreet/continuous output of a function. So this approach gives the value. For example : given x what is f(x)

    For example given a training set of different factors and the price of a property after training we can provide the required factors to determine what will be the property price.

    Logistic regression is basically a binary classification algorithm which means that here there will be discreet valued output for the function . For example : for a given x if f(x)>threshold classify it to be 1 else classify it to be 0.

    For example given a set of brain tumour size as training data we can use the size as input to determine whether its a benine or malignant tumour. Therefore here the output is discreet either 0 or 1.

    *here the function is basically the hypothesis function

提交回复
热议问题