🐾 ML_Zoomcamp_2025 – Austin Animal Center Project
Problem Statement -What we’re trying to predict:
This project predicts whether a pet entering the Austin Animal Center will be adopted or not. Using information such as animal type, breed, intake condition, and other relevant attributes, the model outputs a probability of adoption for each animal.
- Dataset- data folder
This project uses public datasets from the Austin Animal Center, which include:
• Intakes: Records of animals entering the shelter
Outcomes: Records of animals leaving the shelter
These datasets contain information such as animal type, breed, intake reason, outcome type, and dates.
- ,EDA , Data Cleaning
The notebook performs the following preprocessing steps:
• ✅ Loads both datasets and merges them on animal_ID
• ✅ Filters out irrelevant columns and handles missing values
• ✅ Converts date columns to datetime format
• ✅ Encodes categorical features (e.g., animal type, intake condition)
• ✅ Creates a binary target column: (e.g., Adopted vs. Not Adopted)
Feature Selection :
categorical = ["intake_type", "intake_condition", "animal_type", "sex_upon_intake", "breed", "color"]
numeric = ["month", "year"]
-
Model
The model used is a Random Forest Classifier, trained to predict the outcome of an animal based on:
• Animal type and breed
• Intake condition and type
• Age upon intake
• Time spent in shelter
Output: Predicted outcome category (e.g., Adopted, Returned to Owner) -
Train the Model
To train the model, run the notebook . It will:
• Load and clean the data
• Engineer features and encode categories
• Split into training and test sets
• Train the model and evaluate performance -
Make Predictions
The notebook includes examples of predicting outcomes for new animal entries. You can modify the input features to test different scenarios. -
FastAPI Service
To deploy the model as an API:
• Interactive docs: http://localhost:8000/docs
- Docker Deployment
To containerize the API:
docker build -t pet-adoption-fastapi .
docker run -p 8000:8000 pet-adoption-fastapi
API will be available at http://localhost:8000/docs
Health check: curl http://localhost:8000/health