Below is a practical guide to Multiple (multivariate) Binary Logistic Regression —i.e., predicting a binary outcome (0/1) from multiple features.
Binomial Logistic Regression (usually just called logistic regression) is a statistical method used to model the relationship between one or more independent variables and a binary (two-category) outcome.
Binary: target y∈{0,1}
Multiple (multivariate): more than one input feature x_1, x_2, ..., x_n
Model:
p(y=1∣x)=1/(1+e^{−z}), where z=w_0+w_1*x_1+⋯+w_n*x_n
and w_0, w_1...w_n are weights calculated by x_1, x_2, ..., x_n and errors between y and predicts.
Instead of predicting values directly, logistic regression predicts log-odds using a linear combination of predictors z. The log-odds are then transformed using the logistic (sigmoid) function to produce probabilities between 0 and 1.
Binary Logistic Regression is a probabilistic classification model that uses the sigmoid function to predict the likelihood of one of two outcomes, making it widely used in statistics, data science, and machine learning for interpretable binary decision-making.
Model parameters are estimated using Maximum Likelihood Estimation (MLE). A threshold value (usually 0.5) is used to classify outcomes( If P≥0.5 → class 1; If P<0.5 → class 0).
Multinomial logistic regression is a statistical and machine-learning method used to model the relationship between a set of independent variables (predictors) and a categorical dependent variable with more than two possible outcomes, where the categories have no natural ordering.
Model: For class k:
P(y=k∣x)=e^w_k⋅x / ∑e^w_j⋅x where j=1,2...K
Where: - x = feature vector
w_k = weights for class k
K = number of classes
In the app each object Object_k( object_1, object_2 ... object_m)are describe by independent variables( X_ki – features, i = 1...n ) and one dependent variable( Y_k -target). A method such as ordinary least squares (OLS) is used to calculate the optimal values of the coefficients (beta_0, beta_1, beta_2, ..., beta_n). The target value is calculate by:
Y = beta_0 + beta_01* P_1 + beta_2 *P_2 + ... + beta_n* P_n
where: P_1, P_2...P_n are predictors of target.
The application save data for multiple logistic regression models in database (DB) type SQLite named AppMultiNomialLogisticRegression.db. The regression models are distinguish by name.
The startup screen of the application (App Multinomial Linear Logistic Regression Solver) displays a list of samples of regression models( in spinner list) and buttons for enabling the functions to create (New sample), load (Load), save(Save), save as(Save as), calculate (Calculate), and delete (Delete) samples of regression models. From the main screen, via the menu elements, you can also access functions such as language selection, saving and copying the database, initializing the database with sample data, and auxiliary functions such as help for the application, settings, and a link to the website with a description of all applications by the authors.
The functions for creating (New sample) include the dialog for input the size of matrix where entering a data of new sample – number of rows( the number include row for predicted data P_1, P_2...P_n– last row) and number of columns( the number include column for dependent data Y_1, Y_2,...Y_k– last column). Then are generate table for entering relevant data. The populated table must named before saved. The function Load clear the table.
The old saved table may be showing by selected from spinner list. The showing table may be calculated and solution are appears in dialog App results. The function Print may be executed from this dialog in file AppMultipleLogisticRegressionSolver.txt. The Print include activity Save Db/Save file by it are selected folder where to save the file. After selecting folder appears button for save. From the same activity may shown content of the selected file, and also to delete selected file.