Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Exoplanet Detection Model
|
| 2 |
+
|
| 3 |
+
This repository contains an XGBoost machine learning model for detecting exoplanets using NASA Kepler mission data.
|
| 4 |
+
|
| 5 |
+
## Model Description
|
| 6 |
+
|
| 7 |
+
- **Model Type**: XGBoost Classifier
|
| 8 |
+
- **Task**: Binary classification (planet vs. false positive)
|
| 9 |
+
- **Dataset**: NASA Kepler Exoplanet Archive
|
| 10 |
+
- **Format**: Joblib serialized model
|
| 11 |
+
|
| 12 |
+
## Files
|
| 13 |
+
|
| 14 |
+
- `exoplanet_xgb.joblib`: The trained XGBoost model and feature names
|
| 15 |
+
- `requirements.txt`: Python dependencies needed to use the model
|
| 16 |
+
|
| 17 |
+
## Usage
|
| 18 |
+
|
| 19 |
+
### Loading the Model
|
| 20 |
+
|
| 21 |
+
```python
|
| 22 |
+
import joblib
|
| 23 |
+
import xgboost as xgb
|
| 24 |
+
import numpy as np
|
| 25 |
+
|
| 26 |
+
# Load the model
|
| 27 |
+
arte = joblib.load("exoplanet_xgb.joblib")
|
| 28 |
+
model = arte["model"]
|
| 29 |
+
features = arte["features"]
|
| 30 |
+
|
| 31 |
+
# Make predictions
|
| 32 |
+
# Prepare your data with the required features
|
| 33 |
+
X = np.array([...]) # Your feature values in the correct order
|
| 34 |
+
dmat = xgb.DMatrix(X, feature_names=features)
|
| 35 |
+
predictions = model.predict(dmat)
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
### API Server
|
| 39 |
+
|
| 40 |
+
This model is also available via a FastAPI server. See the repository for `app.py`.
|
| 41 |
+
|
| 42 |
+
```bash
|
| 43 |
+
pip install -r requirements.txt
|
| 44 |
+
uvicorn app:app --host 0.0.0.0 --port 8000
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
Then visit `http://localhost:8000/docs` for interactive API documentation.
|
| 48 |
+
|
| 49 |
+
## Requirements
|
| 50 |
+
|
| 51 |
+
- Python 3.8+
|
| 52 |
+
- xgboost
|
| 53 |
+
- numpy
|
| 54 |
+
- pandas
|
| 55 |
+
- joblib
|
| 56 |
+
|
| 57 |
+
## License
|
| 58 |
+
|
| 59 |
+
This model uses publicly available NASA Kepler data.
|
| 60 |
+
|
| 61 |
+
## Citation
|
| 62 |
+
|
| 63 |
+
Data Source: NASA Exoplanet Archive
|