Here’s an example of the application interface:

This project is a Streamlit-based web application that demonstrates the working of a Logistic Regression Classifier on synthetic datasets. The app allows users to configure various hyperparameters for logistic regression, visualize the dataset, and observe the decision boundaries dynamically.
- Dataset Selection: Choose between Binary or Multiclass datasets generated using
make_blobs. - Hyperparameter Tuning: Modify Logistic Regression parameters, including:
- Regularization (
penalty) - Regularization strength (
C) - Solver type (
solver) - Maximum iterations (
max_iter) - Multi-class strategy (
multi_class) - ElasticNet ratio (
l1_ratio) - Tolerance for convergence (
tol) - Class weight (
class_weight) - Fit intercept, dual optimization, warm start, and more.
- Regularization (
- Interactive Visualization:
- Plot the dataset points with decision boundaries.
- Observe how changes in hyperparameters affect classification results.
- Accuracy Calculation: View the classifier's performance with the current settings.
To run this project, you'll need the following libraries:
streamlitnumpymatplotlibscikit-learn
You can install them using:
pip install streamlit numpy matplotlib scikit-learn-
Clone the repository:
git clone https://github.com/yourusername/logistic-regression-visualization.git cd logistic-regression-visualization -
Run the Streamlit app:
streamlit run app.py
-
Open the URL displayed in your terminal to view the app in your browser.
app.py: Main Streamlit application file.README.md: Project documentation (this file).
- Dataset Creation: Synthetic datasets are generated using the
make_blobsfunction fromscikit-learn. - User Interaction: The sidebar allows users to modify hyperparameters of the Logistic Regression model.
- Visualization: The decision boundary and dataset points are plotted using
matplotlib. - Classifier Training: Logistic Regression is trained on the dataset, and predictions are made.
- Results: The accuracy of the classifier and an updated decision boundary plot are displayed.