{"id":4762,"date":"2026-10-15T08:40:13","date_gmt":"2026-10-15T08:40:13","guid":{"rendered":"https:\/\/prwatech.in\/blog\/?p=4762"},"modified":"2026-10-16T16:47:35","modified_gmt":"2026-10-16T16:47:35","slug":"logistic-regression-in-machine-learning","status":"publish","type":"post","link":"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/","title":{"rendered":"Logistic Regression in Machine Learning"},"content":{"rendered":"<h1><strong><b>Logistic Regression in Machine Learning<\/b><\/strong><\/h1>\n<p>A bank wants to know whether a loan applicant will default. A hospital wants to know whether a tumour is malignant. Your email app wants to know whether a message is spam. In each case the answer is not a number on a scale. It is a choice between categories, and the useful output is a probability, such as an 85 percent chance of default. Logistic regression is the classic tool for this job.<\/p>\n<p>Despite its name, logistic regression is a classification algorithm. It takes the same weighted sum of inputs that linear regression uses, then passes it through a curve called the sigmoid function, which squeezes any number into a value between 0 and 1. That value is read as a probability. Because it is fast, easy to explain and gives probabilities, it is often the first model a team tries, and the baseline everything else must beat.<\/p>\n<p>In this tutorial, we explain what logistic regression is, why a straight line fails for classification, and how the sigmoid function fixes it. We cover the types of logistic regression, the real assumptions behind it, and then run a complete Python example with output from an actual run, including accuracy, a comparison against a simple baseline, and the effect of changing the decision threshold. We end with strengths, limits, common mistakes and a short FAQ.<\/p>\n<h2><strong><b>What is Logistic Regression?<\/b><\/strong><\/h2>\n<p>Logistic regression is a supervised learning algorithm that predicts the probability that an input belongs to a category. The inputs, called independent variables or features, can be numbers or categories. The output, called the dependent variable, is a category, such as yes or no.<\/p>\n<p>Some everyday examples:<\/p>\n<ul>\n<li>Will it rain tomorrow, yes or no?<\/li>\n<li>Is this transaction fraud, yes or no?<\/li>\n<li>Will this customer buy, yes or no?<\/li>\n<\/ul>\n<p>The model first calculates a score from the inputs. It then passes that score through the sigmoid function, so the final output is a probability. A common rule is that a probability of 0.5 or more means the positive class, and anything lower means the negative class.<\/p>\n<h2><strong><b>Types of Logistic Regression<\/b><\/strong><\/h2>\n<h3><strong><b>Binary Logistic Regression<\/b><\/strong><\/h3>\n<p>The outcome has exactly two values, such as 0 and 1, or true and false. A classic example is whether a Titanic passenger survived or not, based on age, ticket class and Gender.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4768\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/log4.png\" alt=\"Binary Logistic Regression in Machine Learning\" width=\"850\" height=\"1045\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3><strong><b>Multinomial Logistic Regression<\/b><\/strong><\/h3>\n<p>The outcome has more than two categories that have no natural order. For example, the weather could be sunny, cloudy or overcast. The model gives one probability for each category, and the probabilities add up to 1. The original page calls this multi linear logistic regression, but the correct name is multinomial.<\/p>\n<p>Here is a small illustrative table of the kind of data involved. The values are made up to show the layout.<\/p>\n<div style=\"border: 1px solid #d9e0ea; border-radius: 8px; overflow-x: auto; margin: 20px 0; -webkit-overflow-scrolling: touch;\">\n<table style=\"width: 100%; min-width: 640px; border-collapse: collapse; font-family: Arial,Helvetica,sans-serif; font-size: 16px; line-height: 1.6; color: #1f2937;\">\n<caption style=\"caption-side: top; text-align: left; padding: 14px 16px; font-weight: bold; font-size: 17px; color: #0f2a4a;\">Weather data with three outlook classes<\/caption>\n<thead>\n<tr>\n<th style=\"background: #0f2a4a; color: #ffffff; text-align: left; padding: 12px 16px; border-bottom: 2px solid #0b1f38;\" scope=\"col\">Temperature (C)<\/th>\n<th style=\"background: #0f2a4a; color: #ffffff; text-align: left; padding: 12px 16px; border-bottom: 2px solid #0b1f38;\" scope=\"col\">Humidity (%)<\/th>\n<th style=\"background: #0f2a4a; color: #ffffff; text-align: left; padding: 12px 16px; border-bottom: 2px solid #0b1f38;\" scope=\"col\">Wind (km per hour)<\/th>\n<th style=\"background: #0f2a4a; color: #ffffff; text-align: left; padding: 12px 16px; border-bottom: 2px solid #0b1f38;\" scope=\"col\">Outlook<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background: #ffffff;\">\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0; font-weight: bold; color: #0f2a4a;\">31<\/td>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">40<\/td>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">8<\/td>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">Sunny<\/td>\n<\/tr>\n<tr style=\"background: #f5f8fc;\">\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0; font-weight: bold; color: #0f2a4a;\">24<\/td>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">78<\/td>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">15<\/td>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">Cloudy<\/td>\n<\/tr>\n<tr style=\"background: #ffffff;\">\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0; font-weight: bold; color: #0f2a4a;\">20<\/td>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">92<\/td>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">22<\/td>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">Overcast<\/td>\n<\/tr>\n<tr style=\"background: #f5f8fc;\">\n<td style=\"padding: 12px 16px; font-weight: bold; color: #0f2a4a;\">33<\/td>\n<td style=\"padding: 12px 16px;\">35<\/td>\n<td style=\"padding: 12px 16px;\">6<\/td>\n<td style=\"padding: 12px 16px;\">Sunny<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4770\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/logi2.png\" alt=\"Logistic regression in Machine Learning\" width=\"850\" height=\"377\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/logi2.png 983w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/logi2-300x133.png 300w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/logi2-768x341.png 768w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3><strong><b>Ordinal Logistic Regression<\/b><\/strong><\/h3>\n<p>A third type applies when the categories have a natural order, such as low, medium and high. Only this type depends on order.<\/p>\n<div style=\"border: 1px solid #d9e0ea; border-radius: 8px; overflow-x: auto; margin: 20px 0; -webkit-overflow-scrolling: touch;\">\n<table style=\"width: 100%; min-width: 660px; border-collapse: collapse; font-family: Arial,Helvetica,sans-serif; font-size: 16px; line-height: 1.6; color: #1f2937;\">\n<caption style=\"caption-side: top; text-align: left; padding: 14px 16px; font-weight: bold; font-size: 17px; color: #0f2a4a;\">Types of logistic regression<\/caption>\n<thead>\n<tr>\n<th style=\"background: #0f2a4a; color: #ffffff; text-align: left; padding: 12px 16px; border-bottom: 2px solid #0b1f38; width: 170px;\" scope=\"col\">Type<\/th>\n<th style=\"background: #0f2a4a; color: #ffffff; text-align: left; padding: 12px 16px; border-bottom: 2px solid #0b1f38; width: 240px;\" scope=\"col\">Outcome<\/th>\n<th style=\"background: #0f2a4a; color: #ffffff; text-align: left; padding: 12px 16px; border-bottom: 2px solid #0b1f38;\" scope=\"col\">Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background: #ffffff;\">\n<th style=\"text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e9f0; color: #0f2a4a; white-space: nowrap;\" scope=\"row\">Binary<\/th>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">Two categories<\/td>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">Fraud or not fraud<\/td>\n<\/tr>\n<tr style=\"background: #f5f8fc;\">\n<th style=\"text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e9f0; color: #0f2a4a; white-space: nowrap;\" scope=\"row\">Multinomial<\/th>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">Three or more, no order<\/td>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">Sunny, cloudy, overcast<\/td>\n<\/tr>\n<tr style=\"background: #ffffff;\">\n<th style=\"text-align: left; padding: 12px 16px; color: #0f2a4a; white-space: nowrap;\" scope=\"row\">Ordinal<\/th>\n<td style=\"padding: 12px 16px;\">Three or more, with order<\/td>\n<td style=\"padding: 12px 16px;\">Low, medium, high risk<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>&nbsp;<\/p>\n<h2><strong><b>Why Not Just Use Linear Regression?<\/b><\/strong><\/h2>\n<p>Linear regression draws a straight line, and a straight line has no limits. It can predict 1.7 or minus 0.4, which make no sense as probabilities. A few extreme points can also tilt the line and shift every prediction. We need a curve that stays between 0 and 1.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4900\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/Logistic-Regression.png\" alt=\"Logistic Regression Formula\" width=\"850\" height=\"281\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>What is the Sigmoid Function?<\/b><\/strong><\/h2>\n<p>The sigmoid function takes any real number and maps it to a value between 0 and 1. It is shaped like a stretched letter S. Large positive numbers go close to 1, large negative numbers go close to 0, and zero maps exactly to 0.5. The formula is 1 divided by 1 plus e raised to the power of minus z, where z is the weighted sum of the inputs.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4771\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/logi3.png\" alt=\"Sigmoid function formula - Logistic regression in Machine Learning\" width=\"850\" height=\"378\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/logi3.png 337w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/logi3-300x134.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<div style=\"border: 1px solid #d9e0ea; border-radius: 8px; overflow-x: auto; margin: 20px 0; -webkit-overflow-scrolling: touch;\">\n<table style=\"width: 100%; min-width: 680px; border-collapse: collapse; font-family: Arial,Helvetica,sans-serif; font-size: 16px; line-height: 1.6; color: #1f2937;\">\n<caption style=\"caption-side: top; text-align: left; padding: 14px 16px; font-weight: bold; font-size: 17px; color: #0f2a4a;\">How the sigmoid turns a score into a probability<\/caption>\n<thead>\n<tr>\n<th style=\"background: #0f2a4a; color: #ffffff; text-align: left; padding: 12px 16px; border-bottom: 2px solid #0b1f38; width: 180px;\" scope=\"col\">Score z<\/th>\n<th style=\"background: #0f2a4a; color: #ffffff; text-align: left; padding: 12px 16px; border-bottom: 2px solid #0b1f38; width: 180px;\" scope=\"col\">Probability<\/th>\n<th style=\"background: #0f2a4a; color: #ffffff; text-align: left; padding: 12px 16px; border-bottom: 2px solid #0b1f38;\" scope=\"col\">What it means<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background: #ffffff;\">\n<th style=\"text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e9f0; color: #0f2a4a; white-space: nowrap;\" scope=\"row\">Minus 4<\/th>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">0.018<\/td>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">Almost surely the negative class<\/td>\n<\/tr>\n<tr style=\"background: #f5f8fc;\">\n<th style=\"text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e9f0; color: #0f2a4a; white-space: nowrap;\" scope=\"row\">Minus 2<\/th>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">0.119<\/td>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">Probably negative<\/td>\n<\/tr>\n<tr style=\"background: #ffffff;\">\n<th style=\"text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e9f0; color: #0f2a4a; white-space: nowrap;\" scope=\"row\">0<\/th>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">0.500<\/td>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">A coin toss<\/td>\n<\/tr>\n<tr style=\"background: #f5f8fc;\">\n<th style=\"text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e9f0; color: #0f2a4a; white-space: nowrap;\" scope=\"row\">2<\/th>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">0.881<\/td>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">Probably positive<\/td>\n<\/tr>\n<tr style=\"background: #ffffff;\">\n<th style=\"text-align: left; padding: 12px 16px; color: #0f2a4a; white-space: nowrap;\" scope=\"row\">4<\/th>\n<td style=\"padding: 12px 16px;\">0.982<\/td>\n<td style=\"padding: 12px 16px;\">Almost surely positive<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>&nbsp;<\/p>\n<p>I checked these values by running them. Notice how a change from 0 to 2 moves the probability a lot, while a change from 2 to 4 moves it very little. The curve flattens at the ends.<\/p>\n<p>Note that the sigmoid limits the model output, which is the prediction. It does not limit the cost function, as the original page says.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4767\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/logi4.png\" alt=\"Logistic Function in Machine Learning\" width=\"850\" height=\"634\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/logi4.png 705w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/logi4-300x224.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>Odds and Log Odds, in Plain Words<\/b><\/strong><\/h2>\n<p>Probability tells you how likely something is. <strong><b>Odds<\/b><\/strong>\u00a0compare the chance of it happening with the chance of it not happening. If the probability is 0.75, the odds are 0.75 to 0.25, which is 3 to 1. The <strong><b>log odds<\/b><\/strong>\u00a0are the natural logarithm of the odds.<\/p>\n<p>Here is the key idea. Logistic regression assumes the log odds change in a straight line with the inputs. The sigmoid then converts the log odds back into a probability. That is what makes the model easy to interpret: each coefficient tells you how much the log odds change when that input rises by one unit.<\/p>\n<h2><strong><b>Assumptions of Logistic Regression<\/b><\/strong><\/h2>\n<p>These are the real assumptions, and a few things that people often confuse with them.<\/p>\n<ol>\n<li><b><\/b><strong><b>The outcome is categorical.<\/b><\/strong>Binary for the basic model, more categories for multinomial or ordinal. Order matters only for ordinal.<\/li>\n<li><b><\/b><strong><b>Observations are independent.<\/b><\/strong>Each row should not depend on another, so repeated measures of the same person break this.<\/li>\n<li><b><\/b><strong><b>Little multicollinearity.<\/b><\/strong>The inputs should not be strongly correlated with each other. They do not need to be fully independent.<\/li>\n<li><b><\/b><strong><b>A straight line relationship with the log odds.<\/b><\/strong>Between each numeric input and the log odds of the outcome, not the outcome itself.<\/li>\n<li><b><\/b><strong><b>No extreme outliers that dominate.<\/b><\/strong>A few very unusual points can pull the fit.<\/li>\n<\/ol>\n<p>Two items from the original list are not assumptions. A sample size rule such as 50 observations per input is a rule of thumb. Handling missing values is a data preparation step, done before you fit the model.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>Logistic Regression in Python With scikit learn<\/b><\/strong><\/h2>\n<p>This program uses the breast cancer dataset that comes with scikit learn, with 569 patients and 30 measurements each. The label is malignant or benign. The program checks the sigmoid values, trains a model, compares it with a baseline, shows a confusion matrix, tests the effect of the threshold and ends with a three class example on the Iris dataset.<\/p>\n<div style=\"margin: 20px 0; border: 1px solid #d9e0ea; border-radius: 8px; overflow: hidden;\">\n<div style=\"background: #0f2a4a; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">python<\/div>\n<pre style=\"margin: 0; padding: 16px; background: #f5f8fc; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre;\">import numpy as np\r\nfrom sklearn.datasets import load_breast_cancer, load_iris\r\nfrom sklearn.linear_model import LogisticRegression\r\nfrom sklearn.metrics import confusion_matrix, classification_report\r\nfrom sklearn.model_selection import train_test_split\r\nfrom sklearn.pipeline import make_pipeline\r\nfrom sklearn.preprocessing import StandardScaler\r\n\r\n# The sigmoid function\r\ndef sigmoid(z):\r\n    return 1 \/ (1 + np.exp(-z))\r\n\r\nfor z in [-4, -2, 0, 2, 4]:\r\n    print(\"z =\", z, \"probability =\", round(float(sigmoid(z)), 3))\r\n\r\n# Binary logistic regression\r\ndata = load_breast_cancer()\r\nX, y = data.data, data.target\r\nX_train, X_test, y_train, y_test = train_test_split(\r\n    X, y, test_size=0.3, random_state=0, stratify=y\r\n)\r\nmodel = make_pipeline(StandardScaler(), LogisticRegression(max_iter=1000))\r\nmodel.fit(X_train, y_train)\r\nprint(\"Test accuracy:\", round(model.score(X_test, y_test), 3))\r\nprint(\"Baseline (always guess the common class):\", round(max(y_test.mean(), 1 - y_test.mean()), 3))\r\nprint(confusion_matrix(y_test, model.predict(X_test)))\r\nprint(classification_report(y_test, model.predict(X_test), target_names=data.target_names))\r\n\r\n# Probabilities and the threshold\r\nproba = model.predict_proba(X_test)[:, 1]\r\nfor t in [0.5, 0.8]:\r\n    pred = (proba &gt;= t).astype(int)\r\n    tn, fp, fn, tp = confusion_matrix(y_test, pred).ravel()\r\n    print(\"threshold\", t, \"false positives\", fp, \"false negatives\", fn)\r\n\r\n# Multiclass (three outcomes) on Iris\r\nXi, yi = load_iris(return_X_y=True)\r\nXi_train, Xi_test, yi_train, yi_test = train_test_split(\r\n    Xi, yi, test_size=0.3, random_state=0, stratify=yi\r\n)\r\nmulti = make_pipeline(StandardScaler(), LogisticRegression(max_iter=1000)).fit(Xi_train, yi_train)\r\nprint(\"Iris three class accuracy:\", round(multi.score(Xi_test, yi_test), 3))\r\nprint(\"Probabilities for one flower:\", multi.predict_proba(Xi_test[:1]).round(3))<\/pre>\n<div style=\"background: #1f2937; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">output<\/div>\n<pre style=\"margin: 0; padding: 16px; background: #ffffff; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre;\">z = -4 probability = 0.018\r\nz = -2 probability = 0.119\r\nz = 0 probability = 0.5\r\nz = 2 probability = 0.881\r\nz = 4 probability = 0.982\r\nTest accuracy: 0.959\r\nBaseline (always guess the common class): 0.626\r\n[[ 61   3]\r\n [  4 103]]\r\n              precision    recall  f1-score   support\r\n\r\n   malignant       0.94      0.95      0.95        64\r\n      benign       0.97      0.96      0.97       107\r\n\r\n    accuracy                           0.96       171\r\n   macro avg       0.96      0.96      0.96       171\r\nweighted avg       0.96      0.96      0.96       171\r\n\r\nthreshold 0.5 false positives 3 false negatives 4\r\nthreshold 0.8 false positives 2 false negatives 7\r\nIris three class accuracy: 0.978\r\nProbabilities for one flower: [[0.    0.036 0.964]]<\/pre>\n<\/div>\n<h3><strong><b>Part 1: Accuracy and the Baseline<\/b><\/strong><\/h3>\n<p>When I ran the program, it printed:<\/p>\n<div style=\"margin: 20px 0; border: 1px solid #d9e0ea; border-radius: 8px; overflow: hidden;\">\n<div style=\"background: #1f2937; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">output<\/div>\n<pre style=\"margin: 0; padding: 16px; background: #ffffff; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre;\">Test accuracy: 0.959\r\nBaseline (always guess the common class): 0.626<\/pre>\n<\/div>\n<p>The test set has 171 patients. A lazy model that always guesses benign would be right 62.6 percent of the time, so any accuracy must be judged against that number. The original page reports 78.35 percent with no baseline and no dataset name, so a reader cannot tell whether that is good.<\/p>\n<h3><strong><b>Part 2: The Confusion Matrix<\/b><\/strong><\/h3>\n<div style=\"margin: 20px 0; border: 1px solid #d9e0ea; border-radius: 8px; overflow: hidden;\">\n<div style=\"background: #1f2937; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">output<\/div>\n<pre style=\"margin: 0; padding: 16px; background: #ffffff; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre;\">[[ 61   3]\r\n [  4 103]]<\/pre>\n<\/div>\n<div style=\"border: 1px solid #d9e0ea; border-radius: 8px; overflow-x: auto; margin: 20px 0; -webkit-overflow-scrolling: touch;\">\n<table style=\"width: 100%; min-width: 640px; border-collapse: collapse; font-family: Arial,Helvetica,sans-serif; font-size: 16px; line-height: 1.6; color: #1f2937;\">\n<caption style=\"caption-side: top; text-align: left; padding: 14px 16px; font-weight: bold; font-size: 17px; color: #0f2a4a;\">Confusion matrix for the breast cancer test set<\/caption>\n<thead>\n<tr>\n<td style=\"background: #0f2a4a; border-bottom: 2px solid #0b1f38; width: 210px; padding: 12px 16px;\"><\/td>\n<th style=\"background: #0f2a4a; color: #ffffff; text-align: left; padding: 12px 16px; border-bottom: 2px solid #0b1f38;\" scope=\"col\">Predicted malignant<\/th>\n<th style=\"background: #0f2a4a; color: #ffffff; text-align: left; padding: 12px 16px; border-bottom: 2px solid #0b1f38;\" scope=\"col\">Predicted benign<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background: #ffffff;\">\n<th style=\"text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e9f0; color: #0f2a4a; white-space: nowrap;\" scope=\"row\">Actually malignant<\/th>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">61 correct<\/td>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">3 missed<\/td>\n<\/tr>\n<tr style=\"background: #f5f8fc;\">\n<th style=\"text-align: left; padding: 12px 16px; color: #0f2a4a; white-space: nowrap;\" scope=\"row\">Actually benign<\/th>\n<td style=\"padding: 12px 16px;\">4 false alarms<\/td>\n<td style=\"padding: 12px 16px;\">103 correct<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>&nbsp;<\/p>\n<p>Out of 64 malignant cases, 61 were found and 3 were called benign. Out of 107 benign cases, 4 were flagged as malignant. The precision and recall for each class were between 0.94 and 0.97.<\/p>\n<h3><strong><b>Part 3: Moving the Threshold<\/b><\/strong><\/h3>\n<p>The 0.5 cut off is a default, not a law. Here the model&#8217;s probability is for the benign class, and I tried raising the bar to 0.8:<\/p>\n<div style=\"margin: 20px 0; border: 1px solid #d9e0ea; border-radius: 8px; overflow: hidden;\">\n<div style=\"background: #1f2937; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">output<\/div>\n<pre style=\"margin: 0; padding: 16px; background: #ffffff; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre;\">threshold 0.5 false positives 3 false negatives 4\r\nthreshold 0.8 false positives 2 false negatives 7<\/pre>\n<\/div>\n<p>Here, a false positive means a malignant case called benign, which is the costly mistake. Raising the threshold to 0.8 cut those from 3 to 2, but false negatives, which are benign cases flagged as malignant, rose from 4 to 7. You always trade one kind of error for the other. Choose the threshold based on which mistake costs more in your business, not on the default.<\/p>\n<h3><strong><b>Part 4: Three Outcomes<\/b><\/strong><\/h3>\n<div style=\"margin: 20px 0; border: 1px solid #d9e0ea; border-radius: 8px; overflow: hidden;\">\n<div style=\"background: #1f2937; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">output<\/div>\n<pre style=\"margin: 0; padding: 16px; background: #ffffff; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre;\">Iris three class accuracy: 0.978\r\nProbabilities for one flower: [[0.    0.036 0.964]]<\/pre>\n<\/div>\n<p>With three flower species, the same model gives one probability for each, and they add up to 1. For the flower shown, the model is 96.4 percent sure of the third species. The test set has 45 flowers, so 0.978 means 44 correct.<\/p>\n<h2><strong><b>Key Settings in LogisticRegression<\/b><\/strong><\/h2>\n<div style=\"border: 1px solid #d9e0ea; border-radius: 8px; overflow-x: auto; margin: 20px 0; -webkit-overflow-scrolling: touch;\">\n<table style=\"width: 100%; min-width: 700px; border-collapse: collapse; font-family: Arial,Helvetica,sans-serif; font-size: 16px; line-height: 1.6; color: #1f2937;\">\n<caption style=\"caption-side: top; text-align: left; padding: 14px 16px; font-weight: bold; font-size: 17px; color: #0f2a4a;\">Key LogisticRegression settings in scikit learn<\/caption>\n<thead>\n<tr>\n<th style=\"background: #0f2a4a; color: #ffffff; text-align: left; padding: 12px 16px; border-bottom: 2px solid #0b1f38; width: 180px;\" scope=\"col\">Setting<\/th>\n<th style=\"background: #0f2a4a; color: #ffffff; text-align: left; padding: 12px 16px; border-bottom: 2px solid #0b1f38; width: 130px;\" scope=\"col\">Default<\/th>\n<th style=\"background: #0f2a4a; color: #ffffff; text-align: left; padding: 12px 16px; border-bottom: 2px solid #0b1f38;\" scope=\"col\">What it does<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background: #ffffff;\">\n<th style=\"text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e9f0; color: #0f2a4a; white-space: nowrap;\" scope=\"row\">C<\/th>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">1.0<\/td>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">Inverse of regularization strength. Smaller means a simpler model<\/td>\n<\/tr>\n<tr style=\"background: #f5f8fc;\">\n<th style=\"text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e9f0; color: #0f2a4a; white-space: nowrap;\" scope=\"row\">penalty<\/th>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">l2<\/td>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">The type of regularization that discourages large coefficients<\/td>\n<\/tr>\n<tr style=\"background: #ffffff;\">\n<th style=\"text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e9f0; color: #0f2a4a; white-space: nowrap;\" scope=\"row\">solver<\/th>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">lbfgs<\/td>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">The method that finds the coefficients<\/td>\n<\/tr>\n<tr style=\"background: #f5f8fc;\">\n<th style=\"text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e9f0; color: #0f2a4a; white-space: nowrap;\" scope=\"row\">max_iter<\/th>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">100<\/td>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">Maximum steps. Raise it if you see a convergence warning<\/td>\n<\/tr>\n<tr style=\"background: #ffffff;\">\n<th style=\"text-align: left; padding: 12px 16px; color: #0f2a4a; white-space: nowrap;\" scope=\"row\">class_weight<\/th>\n<td style=\"padding: 12px 16px;\">None<\/td>\n<td style=\"padding: 12px 16px;\">Use balanced when one class is rare<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>&nbsp;<\/p>\n<h2><strong><b>Strengths and Limitations of Logistic Regression<\/b><\/strong><\/h2>\n<h3><strong><b>Strengths<\/b><\/strong><\/h3>\n<ul>\n<li>Simple, fast and easy to explain.<\/li>\n<li>Gives probabilities, not only labels.<\/li>\n<li>Coefficients show how each input affects the outcome.<\/li>\n<li>Works well as a first model and a baseline.<\/li>\n<li>Needs little tuning and trains quickly on large data.<\/li>\n<\/ul>\n<h3><strong><b>Limitations<\/b><\/strong><\/h3>\n<ul>\n<li>Assumes a straight line relationship with the log odds, so it can miss curved patterns.<\/li>\n<li>Can struggle when classes cannot be separated by a flat boundary.<\/li>\n<li>Sensitive to correlated inputs and to scale, if you use regularization.<\/li>\n<li>Needs a threshold choice for imbalanced classes.<\/li>\n<\/ul>\n<h2><strong><b>Where Logistic Regression is Used?<\/b><\/strong><\/h2>\n<ul>\n<li><b><\/b><b><\/b>Credit scoring and loan default.<\/li>\n<li><b><\/b><b><\/b>Disease risk from patient measurements.<\/li>\n<li><b><\/b><b><\/b>Predicting whether a lead will convert.<\/li>\n<li><b><\/b><b><\/b>Spam filtering.<\/li>\n<li><b><\/b><b><\/b>Predicting whether equipment will fail.<\/li>\n<\/ul>\n<h2><strong><b>Common Mistakes to Avoid<\/b><\/strong><\/h2>\n<ul>\n<li><b><\/b><strong><b>Reporting accuracy without a baseline. <\/b><\/strong>Always compare with a lazy model.<\/li>\n<li><b><\/b><strong><b>Ignoring the threshold. <\/b><\/strong>The default of 0.5 may not suit your costs.<\/li>\n<li><b><\/b><strong><b>Forgetting to scale. <\/b><\/strong>It helps convergence and regularization.<\/li>\n<li><b><\/b><strong><b>Using it on curved patterns without extra features. <\/b><\/strong>Add terms or choose another model.<\/li>\n<li><b><\/b><strong><b>Leaving highly correlated inputs. <\/b><\/strong>The coefficients become unstable.<\/li>\n<li><b><\/b><strong><b>Calling it regression for numbers. <\/b><\/strong>It predicts categories.<\/li>\n<\/ul>\n<p>Logistic regression is a small idea that goes a long way. A weighted sum, a sigmoid curve and a threshold give you a model that is fast, explainable and surprisingly hard to beat. Run the program on your own data, compare it with a baseline, and choose your threshold with your costs in mind. If the pattern is curved, try a random forest next.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Logistic Regression in Machine Learning A bank wants to know whether a loan applicant will default. A hospital wants to know whether a tumour is malignant. Your email app wants to know whether a message is spam. In each case the answer is not a number on a scale. It is a choice between categories, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4769,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32,1696],"tags":[419,1756,1757,417,418,420],"class_list":["post-4762","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-machine-learning","category-machine-learning-modules","tag-assumptions-for-logistic-regression","tag-data-science-tutorial-for-beginners-logistic-regression","tag-logistic-regression-for-machine-learning","tag-logistic-regression-in-machine-learning","tag-types-of-logistic-regression-models","tag-what-is-sigmoid-function"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Logistic Regression in Machine Learning With Python | Prwatech<\/title>\n<meta name=\"description\" content=\"Learn how logistic regression works, from the sigmoid function and odds to types, assumptions and a tested Python example with accuracy and recall.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Logistic Regression in Machine Learning With Python | Prwatech\" \/>\n<meta property=\"og:description\" content=\"Learn how logistic regression works, from the sigmoid function and odds to types, assumptions and a tested Python example with accuracy and recall.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/\" \/>\n<meta property=\"og:site_name\" content=\"Prwatech\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prwatech.in\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-15T08:40:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-16T16:47:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/logi1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"986\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Prwatech\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Eduprwatech\" \/>\n<meta name=\"twitter:site\" content=\"@Eduprwatech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prwatech\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/\",\"url\":\"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/\",\"name\":\"Logistic Regression in Machine Learning With Python | Prwatech\",\"isPartOf\":{\"@id\":\"https:\/\/prwatech.in\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/logi1.png\",\"datePublished\":\"2026-10-15T08:40:13+00:00\",\"dateModified\":\"2026-10-16T16:47:35+00:00\",\"author\":{\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3\"},\"description\":\"Learn how logistic regression works, from the sigmoid function and odds to types, assumptions and a tested Python example with accuracy and recall.\",\"breadcrumb\":{\"@id\":\"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/#primaryimage\",\"url\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/logi1.png\",\"contentUrl\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/logi1.png\",\"width\":986,\"height\":512,\"caption\":\"Logistic Regression in Machine Learning\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/prwatech.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Logistic Regression in Machine Learning\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/prwatech.in\/blog\/#website\",\"url\":\"https:\/\/prwatech.in\/blog\/\",\"name\":\"Prwatech\",\"description\":\"Share Ideas, Start Something Good.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/prwatech.in\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3\",\"name\":\"Prwatech\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g\",\"caption\":\"Prwatech\"},\"url\":\"https:\/\/prwatech.in\/blog\/author\/prwatech123\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Logistic Regression in Machine Learning With Python | Prwatech","description":"Learn how logistic regression works, from the sigmoid function and odds to types, assumptions and a tested Python example with accuracy and recall.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/","og_locale":"en_US","og_type":"article","og_title":"Logistic Regression in Machine Learning With Python | Prwatech","og_description":"Learn how logistic regression works, from the sigmoid function and odds to types, assumptions and a tested Python example with accuracy and recall.","og_url":"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/","og_site_name":"Prwatech","article_publisher":"https:\/\/www.facebook.com\/prwatech.in\/","article_published_time":"2026-10-15T08:40:13+00:00","article_modified_time":"2026-10-16T16:47:35+00:00","og_image":[{"width":986,"height":512,"url":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/logi1.png","type":"image\/png"}],"author":"Prwatech","twitter_card":"summary_large_image","twitter_creator":"@Eduprwatech","twitter_site":"@Eduprwatech","twitter_misc":{"Written by":"Prwatech","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/","url":"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/","name":"Logistic Regression in Machine Learning With Python | Prwatech","isPartOf":{"@id":"https:\/\/prwatech.in\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/#primaryimage"},"image":{"@id":"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/#primaryimage"},"thumbnailUrl":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/logi1.png","datePublished":"2026-10-15T08:40:13+00:00","dateModified":"2026-10-16T16:47:35+00:00","author":{"@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3"},"description":"Learn how logistic regression works, from the sigmoid function and odds to types, assumptions and a tested Python example with accuracy and recall.","breadcrumb":{"@id":"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/#primaryimage","url":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/logi1.png","contentUrl":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/logi1.png","width":986,"height":512,"caption":"Logistic Regression in Machine Learning"},{"@type":"BreadcrumbList","@id":"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/logistic-regression-in-machine-learning\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/prwatech.in\/blog\/"},{"@type":"ListItem","position":2,"name":"Logistic Regression in Machine Learning"}]},{"@type":"WebSite","@id":"https:\/\/prwatech.in\/blog\/#website","url":"https:\/\/prwatech.in\/blog\/","name":"Prwatech","description":"Share Ideas, Start Something Good.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/prwatech.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3","name":"Prwatech","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g","caption":"Prwatech"},"url":"https:\/\/prwatech.in\/blog\/author\/prwatech123\/"}]}},"_links":{"self":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/4762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/comments?post=4762"}],"version-history":[{"count":18,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/4762\/revisions"}],"predecessor-version":[{"id":12018,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/4762\/revisions\/12018"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/media\/4769"}],"wp:attachment":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/media?parent=4762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/categories?post=4762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/tags?post=4762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}