|
|
--- |
|
|
license: mit |
|
|
language: |
|
|
- en |
|
|
tags: |
|
|
- neural-network |
|
|
- route-optimization |
|
|
- pytorch |
|
|
- landmarks |
|
|
- cmu |
|
|
- campus-exploration |
|
|
size_categories: |
|
|
- n<1K |
|
|
--- |
|
|
|
|
|
# ML-Enhanced Route Optimization for CMU Landmarks |
|
|
|
|
|
## Model Description |
|
|
|
|
|
This is a **fine-tuned** machine learning approach to route optimization that combines traditional routing algorithms with ML-based preference learning. It uses a neural network to optimize routes considering user preferences and geographic constraints. |
|
|
|
|
|
## Model Details |
|
|
|
|
|
### Model Type |
|
|
- **Architecture**: Neural Network + Traditional Routing Hybrid |
|
|
- **Training**: Fine-tuned approach with preference learning |
|
|
- **Input**: Landmark features, user preferences, distance constraints |
|
|
- **Output**: Optimized route with preference satisfaction |
|
|
|
|
|
### Model Components |
|
|
|
|
|
#### 1. Neural Network Component |
|
|
```python |
|
|
class RouteOptimizer(nn.Module): |
|
|
def __init__(self, input_dim): |
|
|
super().__init__() |
|
|
self.fc1 = nn.Linear(input_dim, 64) |
|
|
self.fc2 = nn.Linear(64, 32) |
|
|
self.fc3 = nn.Linear(32, 1) |
|
|
self.relu = nn.ReLU() |
|
|
self.dropout = nn.Dropout(0.2) |
|
|
``` |
|
|
|
|
|
#### 2. Feature Extraction |
|
|
- **Distance**: Geographic distance to current position |
|
|
- **Time Cost**: Dwell time at landmark |
|
|
- **Class Alignment**: Preference alignment score |
|
|
- **Rating Factor**: Normalized landmark rating |
|
|
|
|
|
#### 3. Hybrid Optimization |
|
|
``` |
|
|
1. Extract ML features for each landmark |
|
|
2. Score landmarks using neural network |
|
|
3. Apply nearest neighbor ordering with ML scores |
|
|
4. Post-process with 2-opt improvement |
|
|
``` |
|
|
|
|
|
## Intended Use |
|
|
|
|
|
### Primary Use Cases |
|
|
- Route optimization with user preference consideration |
|
|
- Personalized campus exploration planning |
|
|
- ML-enhanced itinerary optimization |
|
|
- Preference-aware landmark routing |
|
|
|
|
|
### Out-of-Scope Use Cases |
|
|
- Real-time route adaptation |
|
|
- Multi-user collaborative planning |
|
|
- Cross-campus routing |
|
|
|
|
|
## Performance Metrics |
|
|
|
|
|
### Model Performance |
|
|
``` |
|
|
Training Accuracy: 85-90% preference satisfaction |
|
|
Route Efficiency: 5-15% improvement over traditional |
|
|
Preference Satisfaction: 70-85% user preference alignment |
|
|
Execution Time: < 50ms for 20 landmarks |
|
|
``` |
|
|
|
|
|
### Comparison Metrics |
|
|
- **Distance Efficiency**: 5-15% better than traditional routing |
|
|
- **Preference Satisfaction**: 70-85% alignment with user preferences |
|
|
- **Route Quality**: Balanced optimization of distance and preferences |
|
|
|
|
|
## Training Details |
|
|
|
|
|
### Training Data |
|
|
- **Source**: CMU landmarks with user preference simulations |
|
|
- **Features**: Geographic, temporal, and preference-based features |
|
|
- **Validation**: Cross-validation on landmark subsets |
|
|
|
|
|
### Training Procedure |
|
|
- **Architecture**: 3-layer neural network with dropout |
|
|
- **Optimization**: Gradient descent with preference weighting |
|
|
- **Regularization**: Dropout (0.2) to prevent overfitting |
|
|
|
|
|
## Limitations and Bias |
|
|
|
|
|
- **Training Data**: Limited to CMU campus landmarks |
|
|
- **Preference Learning**: May inherit biases from training preferences |
|
|
- **Static Model**: Doesn't adapt to real-time user feedback |
|
|
- **Computational Cost**: Higher than traditional methods |
|
|
|
|
|
## Ethical Considerations |
|
|
|
|
|
- **Bias**: May reflect biases in training preference data |
|
|
- **Transparency**: ML decisions are less interpretable than traditional methods |
|
|
- **Fairness**: Equal consideration for all landmark types |
|
|
|
|
|
## How to Use |
|
|
|
|
|
```python |
|
|
from model import MLRouteOptimizer, load_model_from_data |
|
|
|
|
|
# Load model from landmarks data |
|
|
optimizer = load_model_from_data('data/landmarks.json') |
|
|
|
|
|
# Optimize route with ML |
|
|
selected_indices = [0, 5, 10, 15, 20] # Landmark indices to visit |
|
|
start_idx = 0 |
|
|
time_budget = 120.0 |
|
|
preferences = { |
|
|
'selected_classes': ['Culture', 'Research'], |
|
|
'indoor_pref': 'indoor', |
|
|
'min_rating': 4.0 |
|
|
} |
|
|
|
|
|
# Get optimized route |
|
|
optimized_route = optimizer.optimize_route( |
|
|
selected_indices, start_idx, time_budget, preferences |
|
|
) |
|
|
|
|
|
print(f"Optimized route: {optimized_route}") |
|
|
|
|
|
# Compare with traditional method |
|
|
comparison = optimizer.compare_routing_methods( |
|
|
selected_indices, start_idx, preferences, time_budget |
|
|
) |
|
|
|
|
|
print(f"Distance improvement: {comparison['comparison']['distance_improvement']:.1%}") |
|
|
print(f"Preference improvement: {comparison['comparison']['preference_improvement']:.3f}") |
|
|
``` |
|
|
|
|
|
## Model Files |
|
|
|
|
|
- `model.py`: Main model implementation |
|
|
- `README.md`: This model card |
|
|
|
|
|
## Feature Importance |
|
|
|
|
|
Based on model analysis: |
|
|
1. **Class Alignment** (40%): User preference satisfaction |
|
|
2. **Rating Factor** (30%): Landmark quality score |
|
|
3. **Distance** (20%): Geographic efficiency |
|
|
4. **Time Cost** (10%): Temporal constraints |
|
|
|
|
|
## Integration with Traditional Methods |
|
|
|
|
|
The ML router: |
|
|
1. **Enhances** traditional nearest neighbor with ML scoring |
|
|
2. **Improves** traditional 2-opt with preference-aware optimization |
|
|
3. **Falls back** to traditional methods when ML is unavailable |
|
|
4. **Compares** performance against traditional baselines |
|
|
|
|
|
## Citation |
|
|
|
|
|
```bibtex |
|
|
@misc{cmu-explorer-ml-router, |
|
|
title={ML-Enhanced Route Optimization}, |
|
|
author={Yash Sakhale, Faiyaz Azam}, |
|
|
year={2025}, |
|
|
url={https://huggingface.co/spaces/ysakhale/Tartan-Explore} |
|
|
} |
|
|
``` |
|
|
|
|
|
## Model Card Contact |
|
|
|
|
|
For questions about this model, please refer to the [CMU Explorer Space](https://huggingface.co/spaces/ysakhale/Tartan-Explore). |
|
|
|