Using logistic regression to classify data set (asking about the steps) I have a training data set of predictors being classified into 2 classes. For now, I have already created a logistic regression model, that is, having solved the coefficients $\beta_0, \beta_1,\cdots$.
What do I do now to be able to classify the testing data set?

Given a training dataset $(X,y)$ where $X$ is the covariate matrix and $y$ the dependent variable, we fit a logistic regression model with coefficients vector $\hat{\beta}$ and its covariance matrix $Cov(\hat{\beta})=\hat{V}$.
When provided a new sample $x_i$, the LR model work the following way:

*

*Estimate the linear predictor, $\hat{\theta}_i=x_i^T\hat{\beta}$

*Estimate the output probability using the sigmoid function, $$\hat{\pi}_i=P(y_i=1|x_i)=sigmoid(\hat{\theta}_i)=\frac{e^{\hat{\theta}_i}}{1+e^{\hat{\theta}_i}}=\frac{1}{1+e^{-\hat{\theta}_i}}$$
that's for the logit linking function. a similar method is available for probit linking function.

*Provide a prediction based on $\hat{\pi}_i$. In a well-balanced model the threshold should be 0.5 (that is, $\hat{y}_i=\begin{cases}1\quad \hat{\pi}_i\ge 0.5\\0\quad \hat{\pi}_i< 0.5\end{cases}$, but there could be other cutoff values).

