April 2024
Beginner to intermediate
432 pages
12h 45m
English
Objective: Use the churn_data to train a logistic regression model that predicts customer churn.
Tasks:
Steps:
1. import pandas as pd2. from sklearn.model_selection import train_test_split3. from sklearn.linear_model import LogisticRegression4. from sklearn.metrics import classification_report
5. churn_data = pd.read_csv('/data/churn_data.csv')
6. X = churn_data.drop('churn', axis=1)7. y = churn_data['churn']
Read now
Unlock full access