Logistic Regression Model for Binary Classification
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.
Model Description
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.
How to Load and Use the Model
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]}")
License
This model is released under the Apache License 2.0.
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
π
Ask for provider support