Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
# Monkey Sterilization Prediction Model
|
| 3 |
+
|
| 4 |
+
This repository contains a trained `LinearRegression` model to predict the number of monkeys sterilized per year based on historical data.
|
| 5 |
+
|
| 6 |
+
## Model Details
|
| 7 |
+
|
| 8 |
+
* **Model Type:** Linear Regression
|
| 9 |
+
* **Input:** Year (numeric)
|
| 10 |
+
* **Output:** Predicted number of monkeys sterilized
|
| 11 |
+
* **Training Data:** Provided in the `Monkey.xlsx` file.
|
| 12 |
+
|
| 13 |
+
## Files
|
| 14 |
+
|
| 15 |
+
* `linear_regression_model.pkl`: The saved scikit-learn Linear Regression model object.
|
| 16 |
+
|
| 17 |
+
## Usage
|
| 18 |
+
|
| 19 |
+
You can load this model using `joblib` and make predictions:
|
| 20 |
+
|
| 21 |
+
```python
|
| 22 |
+
import joblib
|
| 23 |
+
from huggingface_hub import hf_hub_download
|
| 24 |
+
|
| 25 |
+
model_path = hf_hub_download(repo_id="Chama99/monkey-sterilization-model", filename="linear_regression_model.pkl")
|
| 26 |
+
model = joblib.load(model_path)
|
| 27 |
+
|
| 28 |
+
# Example prediction for year 2030
|
| 29 |
+
predicted_sterilized = model.predict([[2030]])
|
| 30 |
+
print(f"Predicted sterilized monkeys in 2030: {int(predicted_sterilized[0])}")
|
| 31 |
+
```
|