Downloads · 30 days
0
farooqhasanDA/logistic-regression-sklearn-model
logistic-regression-sklearn-model is a machine learning model from farooqhasanDA. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
This repository hosts a simple Logistic Regression model trained on synthetic data for a binary classification task. It's built using scikit-learn and saved using joblib.
Downloads · 30 days
0
Access
Public
Updated Nov 11, 2025
Repo size
895 B
Likes
0
Public
Click a slice to open those files.
.md1.7 KB · 41%
From the Hugging Face model README
This repository hosts a simple Logistic Regression model trained on synthetic data for a binary classification task. It's built using scikit-learn and saved using joblib.
This model is designed to classify data points into one of two categories (0 or 1) based on 4 input features. It serves as a demonstration for deploying scikit-learn models to the Hugging Face Hub.
You can easily load and use this model in your Python environment:
from huggingface_hub import hf_hub_download
import joblib
import numpy as np
# Define the model repository ID and filename within the repo
repo_id = "farooqhasanDA/logistic-regression-sklearn-model" # Your Hugging Face repository ID
model_filename_in_repo = "models/logistic_regression_model.joblib"
# Download the model file
model_path = hf_hub_download(repo_id=repo_id, filename=model_filename_in_repo)
# Load the model
loaded_model = joblib.load(model_path)
# Example prediction with synthetic input (4 features)
X_new = np.array([[0.1, 0.2, -0.3, 0.4]]) # Replace with your actual input
predicted_class = loaded_model.predict(X_new)
predicted_probabilities = loaded_model.predict_proba(X_new)
print(f"Predicted Class: {predicted_class[0]}")
print(f"Predicted Probabilities: {predicted_probabilities[0]}")
This model is released under the Apache License 2.0.