This repository contains questions related to Logistic Regression and its implementation using Python and scikit-learn.
It is designed as a practice assignment to strengthen both theoretical knowledge and practical coding skills.
What is Logistic Regression, and how does it differ from Linear Regression?
Explain the role of the Sigmoid function in Logistic Regression.
What is Regularization in Logistic Regression and why is it needed?
What are some common evaluation metrics for classification models, and why are they important?
Write a Python program that loads a CSV file into a Pandas DataFrame, splits into train/test sets, trains a Logistic Regression model, and prints its accuracy.
Write a Python program to train a Logistic Regression model using L2 regularization (Ridge) and print the model coefficients and accuracy.
Write a Python program to train a Logistic Regression model for multiclass classification using multi_class='ovr' and print the classification report.
Write a Python program to apply GridSearchCV to tune C and penalty hyperparameters for Logistic Regression and print the best parameters and validation accuracy.
Write a Python program to standardize the features before training Logistic Regression and compare the model's accuracy with and without scaling.
Imagine you are working at an e-commerce company that wants to predict which customers will respond to a marketing campaign. Given an imbalanced dataset (only 5% of customers respond), describe the approach youβd take to build a Logistic Regression model β including data handling, feature scaling, balancing classes, hyperparameter tuning, and evaluating the model for this real-world business use case.
- To understand Logistic Regression and its role in classification problems.
- To learn how to apply regularization techniques to prevent overfitting.
- To gain practical experience with Python and scikit-learn for model building.
- To practice hyperparameter tuning using GridSearchCV.
- To explore the importance of feature scaling in Logistic Regression.
- To evaluate models using different classification metrics.
- To understand how to deal with imbalanced datasets in real-world scenarios.
- Difference between Linear Regression and Logistic Regression.
- Role of the Sigmoid function in mapping probabilities.
- Importance of Regularization (L1, L2) for avoiding overfitting.
- Common evaluation metrics: Accuracy, Precision, Recall, F1-score, ROC-AUC.
- Implementing Logistic Regression using train/test split.
- Training Logistic Regression with L2 regularization (Ridge).
- Performing multiclass classification using One-vs-Rest (OvR).
- Using GridSearchCV for hyperparameter optimization.
- Comparing model accuracy with and without feature scaling.
- Approaches to handle imbalanced datasets (resampling, class weights, evaluation metrics).
π This assignment helps in bridging theory with practical implementation, ensuring a solid foundation in classification problems with Logistic Regression.