Taking the analysis of gastric cancer as an example, two groups of people are selected, one is gastric cancer group and the other is non-gastric cancer group. These two kinds of people must have different signs and lifestyles. Therefore, whether the dependent variable is gastric cancer or not, with a "yes" or "no" value, can include many independent variables, such as age, gender, eating habits, Helicobacter pylori infection and so on.
Independent variables can be continuous or classified. Then through logistic regression analysis, we can get the weight of independent variables, so as to roughly understand which factors are the risk factors of gastric cancer. At the same time, according to weight, we can predict the possibility of a person suffering from cancer according to risk factors.
Logistic regression is a generalized linear model, so it has many similarities with multiple linear regression analysis. Their model forms are basically the same,
Both have w' x+b, where w and b are the parameters to be solved, but their dependent variables are different. Multiple linear regression directly takes w' x+b as the dependent variable, that is, y = w' x+b, while logistic regression maps w' x+b to a hidden state p, p = l (w' x+b) through function l, and then according to p and 66, if l is a logistic function, it is a logistic regression, if l is a polynomial function, it is a polynomial regression.