I see many questions on this topic, but I promise none seem to explain what I'm after.
I want to understand how to tie the coefficients I get from a logistic regression model back to the model equation that relates log odds to the sum of coefficients and variables.
Consider this example. Below are the predicted values for out of sample data.
log_model=LogisticRegression()
y_pred=log_model.predict_proba(X_test)
So the predicted values are probabilities (between 0 and 1) of being in class 1. I will call these $\hat{y}_{i}$
The coefficients are the following:
log_model.coef_
array([[-0.9495, 3.4599]])
I'm going to call the dependent variable (as outputed by y_pred) $y$ and independent $x$ and $z$.
Now is this the correct model equation?
Is my understanding correct, that the model (in python) gives us predicted probabilities, but what goes on under the hood is that the dependent variable is actually the log odds? (I understand that one can go from probabilities to log odds and vice versa)
