Downloads · 30 days
0
farooqhasanDA/logistic_regression_model-sklearn-model
logistic_regression_model-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.
This repository hosts a simple Logistic Regression model trained on a synthetic dataset for binary classification. The model is built using scikit-learn and saved using joblib.
Downloads · 30 days
0
Access
Public
Updated Nov 10, 2025
Repo size
895 B
Likes
0
Public
Click a slice to open those files.
.md1.6 KB · 40%
From the Hugging Face model README
This repository hosts a simple Logistic Regression model trained on a synthetic dataset for binary classification. The model is built using scikit-learn and saved using joblib.
sklearn.datasets.make_classification.To load and use this model, you can follow these steps in your Python environment:
from huggingface_hub import hf_hub_download
import joblib
import numpy as np
# Define the repository ID and the model file path
repo_id = "farooqhasanDA/logistic_regression_model-sklearn-model" # Replace with your actual repo_id
filename = "models/logistic_regression_model.joblib"
# Download the model file
model_path = hf_hub_download(repo_id=repo_id, filename=filename)
# Load the model
loaded_model = joblib.load(model_path)
# Example usage: Make a prediction
# Create a dummy input similar to the training data (e.g., 4 features)
dummy_input = np.array([[0.5, -0.2, 1.1, -0.7]])
prediction = loaded_model.predict(dummy_input)
prediction_proba = loaded_model.predict_proba(dummy_input)
print(f"Prediction: {prediction[0]}")
print(f"Prediction Probabilities: {prediction_proba[0]}")
This project is licensed under the Apache License 2.0. See the LICENSE file for details.