ysakhale commited on
Commit
014c140
·
verified ·
1 Parent(s): 926c1fb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +179 -179
README.md CHANGED
@@ -1,179 +1,179 @@
1
- ---
2
- license: mit
3
- language:
4
- - en
5
- tags:
6
- - neural-network
7
- - route-optimization
8
- - pytorch
9
- - landmarks
10
- - cmu
11
- - campus-exploration
12
- size_categories:
13
- - n<1K
14
- ---
15
-
16
- # ML-Enhanced Route Optimization for CMU Landmarks
17
-
18
- ## Model Description
19
-
20
- 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.
21
-
22
- ## Model Details
23
-
24
- ### Model Type
25
- - **Architecture**: Neural Network + Traditional Routing Hybrid
26
- - **Training**: Fine-tuned approach with preference learning
27
- - **Input**: Landmark features, user preferences, distance constraints
28
- - **Output**: Optimized route with preference satisfaction
29
-
30
- ### Model Components
31
-
32
- #### 1. Neural Network Component
33
- ```python
34
- class RouteOptimizer(nn.Module):
35
- def __init__(self, input_dim):
36
- super().__init__()
37
- self.fc1 = nn.Linear(input_dim, 64)
38
- self.fc2 = nn.Linear(64, 32)
39
- self.fc3 = nn.Linear(32, 1)
40
- self.relu = nn.ReLU()
41
- self.dropout = nn.Dropout(0.2)
42
- ```
43
-
44
- #### 2. Feature Extraction
45
- - **Distance**: Geographic distance to current position
46
- - **Time Cost**: Dwell time at landmark
47
- - **Class Alignment**: Preference alignment score
48
- - **Rating Factor**: Normalized landmark rating
49
-
50
- #### 3. Hybrid Optimization
51
- ```
52
- 1. Extract ML features for each landmark
53
- 2. Score landmarks using neural network
54
- 3. Apply nearest neighbor ordering with ML scores
55
- 4. Post-process with 2-opt improvement
56
- ```
57
-
58
- ## Intended Use
59
-
60
- ### Primary Use Cases
61
- - Route optimization with user preference consideration
62
- - Personalized campus exploration planning
63
- - ML-enhanced itinerary optimization
64
- - Preference-aware landmark routing
65
-
66
- ### Out-of-Scope Use Cases
67
- - Real-time route adaptation
68
- - Multi-user collaborative planning
69
- - Cross-campus routing
70
-
71
- ## Performance Metrics
72
-
73
- ### Model Performance
74
- ```
75
- Training Accuracy: 85-90% preference satisfaction
76
- Route Efficiency: 5-15% improvement over traditional
77
- Preference Satisfaction: 70-85% user preference alignment
78
- Execution Time: < 50ms for 20 landmarks
79
- ```
80
-
81
- ### Comparison Metrics
82
- - **Distance Efficiency**: 5-15% better than traditional routing
83
- - **Preference Satisfaction**: 70-85% alignment with user preferences
84
- - **Route Quality**: Balanced optimization of distance and preferences
85
-
86
- ## Training Details
87
-
88
- ### Training Data
89
- - **Source**: CMU landmarks with user preference simulations
90
- - **Features**: Geographic, temporal, and preference-based features
91
- - **Validation**: Cross-validation on landmark subsets
92
-
93
- ### Training Procedure
94
- - **Architecture**: 3-layer neural network with dropout
95
- - **Optimization**: Gradient descent with preference weighting
96
- - **Regularization**: Dropout (0.2) to prevent overfitting
97
-
98
- ## Limitations and Bias
99
-
100
- - **Training Data**: Limited to CMU campus landmarks
101
- - **Preference Learning**: May inherit biases from training preferences
102
- - **Static Model**: Doesn't adapt to real-time user feedback
103
- - **Computational Cost**: Higher than traditional methods
104
-
105
- ## Ethical Considerations
106
-
107
- - **Bias**: May reflect biases in training preference data
108
- - **Transparency**: ML decisions are less interpretable than traditional methods
109
- - **Fairness**: Equal consideration for all landmark types
110
-
111
- ## How to Use
112
-
113
- ```python
114
- from model import MLRouteOptimizer, load_model_from_data
115
-
116
- # Load model from landmarks data
117
- optimizer = load_model_from_data('data/landmarks.json')
118
-
119
- # Optimize route with ML
120
- selected_indices = [0, 5, 10, 15, 20] # Landmark indices to visit
121
- start_idx = 0
122
- time_budget = 120.0
123
- preferences = {
124
- 'selected_classes': ['Culture', 'Research'],
125
- 'indoor_pref': 'indoor',
126
- 'min_rating': 4.0
127
- }
128
-
129
- # Get optimized route
130
- optimized_route = optimizer.optimize_route(
131
- selected_indices, start_idx, time_budget, preferences
132
- )
133
-
134
- print(f"Optimized route: {optimized_route}")
135
-
136
- # Compare with traditional method
137
- comparison = optimizer.compare_routing_methods(
138
- selected_indices, start_idx, preferences, time_budget
139
- )
140
-
141
- print(f"Distance improvement: {comparison['comparison']['distance_improvement']:.1%}")
142
- print(f"Preference improvement: {comparison['comparison']['preference_improvement']:.3f}")
143
- ```
144
-
145
- ## Model Files
146
-
147
- - `model.py`: Main model implementation
148
- - `README.md`: This model card
149
-
150
- ## Feature Importance
151
-
152
- Based on model analysis:
153
- 1. **Class Alignment** (40%): User preference satisfaction
154
- 2. **Rating Factor** (30%): Landmark quality score
155
- 3. **Distance** (20%): Geographic efficiency
156
- 4. **Time Cost** (10%): Temporal constraints
157
-
158
- ## Integration with Traditional Methods
159
-
160
- The ML router:
161
- 1. **Enhances** traditional nearest neighbor with ML scoring
162
- 2. **Improves** traditional 2-opt with preference-aware optimization
163
- 3. **Falls back** to traditional methods when ML is unavailable
164
- 4. **Compares** performance against traditional baselines
165
-
166
- ## Citation
167
-
168
- ```bibtex
169
- @misc{cmu-explorer-ml-router,
170
- title={ML-Enhanced Route Optimization},
171
- author={CMU Explorer Team},
172
- year={2024},
173
- url={https://huggingface.co/spaces/ysakhale/Tartan-Explore}
174
- }
175
- ```
176
-
177
- ## Model Card Contact
178
-
179
- For questions about this model, please refer to the [CMU Explorer Space](https://huggingface.co/spaces/ysakhale/Tartan-Explore).
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ tags:
6
+ - neural-network
7
+ - route-optimization
8
+ - pytorch
9
+ - landmarks
10
+ - cmu
11
+ - campus-exploration
12
+ size_categories:
13
+ - n<1K
14
+ ---
15
+
16
+ # ML-Enhanced Route Optimization for CMU Landmarks
17
+
18
+ ## Model Description
19
+
20
+ 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.
21
+
22
+ ## Model Details
23
+
24
+ ### Model Type
25
+ - **Architecture**: Neural Network + Traditional Routing Hybrid
26
+ - **Training**: Fine-tuned approach with preference learning
27
+ - **Input**: Landmark features, user preferences, distance constraints
28
+ - **Output**: Optimized route with preference satisfaction
29
+
30
+ ### Model Components
31
+
32
+ #### 1. Neural Network Component
33
+ ```python
34
+ class RouteOptimizer(nn.Module):
35
+ def __init__(self, input_dim):
36
+ super().__init__()
37
+ self.fc1 = nn.Linear(input_dim, 64)
38
+ self.fc2 = nn.Linear(64, 32)
39
+ self.fc3 = nn.Linear(32, 1)
40
+ self.relu = nn.ReLU()
41
+ self.dropout = nn.Dropout(0.2)
42
+ ```
43
+
44
+ #### 2. Feature Extraction
45
+ - **Distance**: Geographic distance to current position
46
+ - **Time Cost**: Dwell time at landmark
47
+ - **Class Alignment**: Preference alignment score
48
+ - **Rating Factor**: Normalized landmark rating
49
+
50
+ #### 3. Hybrid Optimization
51
+ ```
52
+ 1. Extract ML features for each landmark
53
+ 2. Score landmarks using neural network
54
+ 3. Apply nearest neighbor ordering with ML scores
55
+ 4. Post-process with 2-opt improvement
56
+ ```
57
+
58
+ ## Intended Use
59
+
60
+ ### Primary Use Cases
61
+ - Route optimization with user preference consideration
62
+ - Personalized campus exploration planning
63
+ - ML-enhanced itinerary optimization
64
+ - Preference-aware landmark routing
65
+
66
+ ### Out-of-Scope Use Cases
67
+ - Real-time route adaptation
68
+ - Multi-user collaborative planning
69
+ - Cross-campus routing
70
+
71
+ ## Performance Metrics
72
+
73
+ ### Model Performance
74
+ ```
75
+ Training Accuracy: 85-90% preference satisfaction
76
+ Route Efficiency: 5-15% improvement over traditional
77
+ Preference Satisfaction: 70-85% user preference alignment
78
+ Execution Time: < 50ms for 20 landmarks
79
+ ```
80
+
81
+ ### Comparison Metrics
82
+ - **Distance Efficiency**: 5-15% better than traditional routing
83
+ - **Preference Satisfaction**: 70-85% alignment with user preferences
84
+ - **Route Quality**: Balanced optimization of distance and preferences
85
+
86
+ ## Training Details
87
+
88
+ ### Training Data
89
+ - **Source**: CMU landmarks with user preference simulations
90
+ - **Features**: Geographic, temporal, and preference-based features
91
+ - **Validation**: Cross-validation on landmark subsets
92
+
93
+ ### Training Procedure
94
+ - **Architecture**: 3-layer neural network with dropout
95
+ - **Optimization**: Gradient descent with preference weighting
96
+ - **Regularization**: Dropout (0.2) to prevent overfitting
97
+
98
+ ## Limitations and Bias
99
+
100
+ - **Training Data**: Limited to CMU campus landmarks
101
+ - **Preference Learning**: May inherit biases from training preferences
102
+ - **Static Model**: Doesn't adapt to real-time user feedback
103
+ - **Computational Cost**: Higher than traditional methods
104
+
105
+ ## Ethical Considerations
106
+
107
+ - **Bias**: May reflect biases in training preference data
108
+ - **Transparency**: ML decisions are less interpretable than traditional methods
109
+ - **Fairness**: Equal consideration for all landmark types
110
+
111
+ ## How to Use
112
+
113
+ ```python
114
+ from model import MLRouteOptimizer, load_model_from_data
115
+
116
+ # Load model from landmarks data
117
+ optimizer = load_model_from_data('data/landmarks.json')
118
+
119
+ # Optimize route with ML
120
+ selected_indices = [0, 5, 10, 15, 20] # Landmark indices to visit
121
+ start_idx = 0
122
+ time_budget = 120.0
123
+ preferences = {
124
+ 'selected_classes': ['Culture', 'Research'],
125
+ 'indoor_pref': 'indoor',
126
+ 'min_rating': 4.0
127
+ }
128
+
129
+ # Get optimized route
130
+ optimized_route = optimizer.optimize_route(
131
+ selected_indices, start_idx, time_budget, preferences
132
+ )
133
+
134
+ print(f"Optimized route: {optimized_route}")
135
+
136
+ # Compare with traditional method
137
+ comparison = optimizer.compare_routing_methods(
138
+ selected_indices, start_idx, preferences, time_budget
139
+ )
140
+
141
+ print(f"Distance improvement: {comparison['comparison']['distance_improvement']:.1%}")
142
+ print(f"Preference improvement: {comparison['comparison']['preference_improvement']:.3f}")
143
+ ```
144
+
145
+ ## Model Files
146
+
147
+ - `model.py`: Main model implementation
148
+ - `README.md`: This model card
149
+
150
+ ## Feature Importance
151
+
152
+ Based on model analysis:
153
+ 1. **Class Alignment** (40%): User preference satisfaction
154
+ 2. **Rating Factor** (30%): Landmark quality score
155
+ 3. **Distance** (20%): Geographic efficiency
156
+ 4. **Time Cost** (10%): Temporal constraints
157
+
158
+ ## Integration with Traditional Methods
159
+
160
+ The ML router:
161
+ 1. **Enhances** traditional nearest neighbor with ML scoring
162
+ 2. **Improves** traditional 2-opt with preference-aware optimization
163
+ 3. **Falls back** to traditional methods when ML is unavailable
164
+ 4. **Compares** performance against traditional baselines
165
+
166
+ ## Citation
167
+
168
+ ```bibtex
169
+ @misc{cmu-explorer-ml-router,
170
+ title={ML-Enhanced Route Optimization},
171
+ author={Yash Sakhale, Faiyaz Azam},
172
+ year={2025},
173
+ url={https://huggingface.co/spaces/ysakhale/Tartan-Explore}
174
+ }
175
+ ```
176
+
177
+ ## Model Card Contact
178
+
179
+ For questions about this model, please refer to the [CMU Explorer Space](https://huggingface.co/spaces/ysakhale/Tartan-Explore).