What is the difference between linear regression and logistic regression?

后端 未结 15 1371
一向
一向 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 03:55

    They are both quite similar in solving for the solution, but as others have said, one (Logistic Regression) is for predicting a category "fit" (Y/N or 1/0), and the other (Linear Regression) is for predicting a value.

    So if you want to predict if you have cancer Y/N (or a probability) - use logistic. If you want to know how many years you will live to - use Linear Regression !

提交回复
热议问题