Downloads · 30 days
0
Edureka123/iris-logreg-sklearn-demo
iris-logreg-sklearn-demo is a machine learning model from Edureka123. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository contains a simple Logistic Regression classifier trained on the classic Iris dataset using scikit-learn.
Downloads · 30 days
0
Access
Public
Updated Nov 27, 2025
Repo size
1.4 KB
Likes
0
Public
Click a slice to open those files.
Other1.5 KB · 35%
From the Hugging Face model README
This repository contains a simple Logistic Regression classifier trained on the classic Iris dataset using scikit-learn.
LogisticRegression(max_iter=200)model.pkl – a pickled Python dictionary containing:
model: trained LogisticRegression objectscaler: StandardScaler used for preprocessingtarget_names: class names (setosa, versicolor, virginica)import pickle
import numpy as np
# Load the model bundle
with open("model.pkl", "rb") as f:
bundle = pickle.load(f)
model = bundle["model"]
scaler = bundle["scaler"]
target_names = bundle["target_names"]
# Example prediction: sepal_length, sepal_width, petal_length, petal_width
x_new = np.array([[5.1, 3.5, 1.4, 0.2]])
x_new_scaled = scaler.transform(x_new)
pred = model.predict(x_new_scaled)[0]
print("Predicted class:", target_names[pred])
The Iris dataset is a classic machine learning dataset containing 150 samples with 4 features each:
Created with: scikit-learn
Uploaded to: Hugging Face Hub