Professional Documents
Culture Documents
Logistic Reg2
Logistic Reg2
Logistic Reg2
Explained
D EC ODI N G D A T A S C I E N C E
For example, the effects of a number of factors on the development or otherwise of a disease. A patient may be
cured or not; a prospect may respond or not, should we grant a loan to particular person or not, etc.
When the outcome or dependent variable is binary, and we wish to measure the effects of several independent
variables on it, we uses Logistic Regression
Creation of Logistic KS
Validate Output
Modeling Regression in Statistic
Output
Dataset Python
Step 2: Splitting the dataset into the Training set and Test set
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.25,
random_state = 0)
Step 2: Feature Scaling
from sklearn.preprocessing import
StandardScaler sc = StandardScaler()
X_train = sc.fit_transform(X_train)
X_test = sc.transform(X_test)
https://github.com/arshad831/Modelling-
Exercise/blob/main/logistic_regression.ip
ynb