• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 19 pages
Exam (elaborations)

WGU D600 Task 2: Logistic Regression Analysis | Complete Report, Python Modeling, Confusion Matrix & Results | 2026/2027 Updated

Document preview thumbnail
Preview 3 out of 19 pages

WGU D600 Task 2: Logistic Regression Analysis | Complete Report, Python Modeling, Confusion Matrix & Results | 2026/2027 Updated

Content preview

WGU D600 Task 2: Logistic Regression
Analysis | Complete Report, Python
Modeling, Confusion Matrix & Results |
2026/2027 Updated

TASK 2: LOGISTIC REGRESSION – COMPLETE
REPORT TEMPLATE
A. RESEARCH QUESTION – PURPOSE
Research Question: Can logistic regression
accurately predict binary categorical outcome using
numerical and categorical predictors?
Goal: Build, evaluate, and interpret logistic
regression model – Address class imbalance, feature
scaling, encoding, feature selection, performance
metrics – Provide Python code, confusion matrix,
ROC-AUC, classification report – Compare to
baseline
Example Dataset: Use your assigned WGU D600
Task 2 dataset – e.g., Churn, Diabetes, Loan Default,

,Attrition – Example here uses Telco Churn – Target
Churn Yes/No – 7043 rows – 21 features – Replace
with your actual D600 file – Same workflow applies
Variables:
• Independent – Numerical – tenure,
MonthlyCharges, TotalCharges – Categorical –
Contract, InternetService, PaymentMethod
• Dependent binary – Churn – 0 No, 1 Yes – Or
Diabetes 0/1, Default 0/1
B. DATA PREPARATION – PYTHON – FULL CODE
Step 1: Import Libraries
Python
import pandas as pdimport numpy as npimport
matplotlib.pyplot as pltimport seaborn as snsfrom
sklearn.model_selection import train_test_split
16 lines hidden
Step 2: EDA – Class Imbalance – Why It Matters
Python

, # Class distribution – Imbalance
checkplt.figure(figsize=(6,4))sns.countplot(x='Churn'
, data=df)plt.title('Class Distribution – Churn – Check
Imbalance')plt.show()
12 lines hidden
Step 3: Data Cleaning – Handling Missing,
Conversion
Python
# Example – TotalCharges object with spaces –
Convert to numericdf['TotalCharges'] =
pd.to_numeric(df['TotalCharges'],
errors='coerce')df['TotalCharges'].fillna(df['TotalChar
ges'].median(), inplace=True)# Drop ID column –
e.g., customerID not predictive
12 lines hidden
Step 4: Train Test Split – Stratified – Scale – Encode
Python

Document information

Uploaded on
October 25, 2026
Number of pages
19
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$16.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Sold
36
Followers
3
Items
3027
Last sold
1 week ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions