Skip to content

example logistic regresssion

Example Script: logistic_regression_example.py

This script demonstrates how to use the LogisticRegression class from the SciREX library to perform classification on the Iris dataset.

The example includes
  • Loading the Iris dataset using sklearn.datasets
  • Preprocessing the data
  • Splitting the data into train and test sets
  • Running the Logistic Regression classifier
  • Evaluating and visualizing the results
Dependencies
  • numpy
  • pandas
  • matplotlib
  • scikit-learn
  • scirex.core.ml.supervised.classification.logistic_regression
Authors
  • Protyush P. Chowdhury (protyushc@iisc.ac.in)
Version Info
  • 28/Dec/2024: Initial version