-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yaml
228 lines (203 loc) · 9.96 KB
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
general:
experiment_dir: "experiments" # Base directory for experiment runs
run_prefix: "run" # Prefix for run folder names
seed: 18
device: "cuda" # General device setting for all models
logging:
verbose: True
# preprocessing:
# data:
# data_file: "data/test.geojson"
# output_file: "data/test_data_preprocessed.csv"
# output_folder: "data"
# mode: 'test'
# target_col: "change_type"
# feature_offset: 1
# num_dates: 5
# option: # TODO: To implement the choice
# advanced_preprocessing: False
# feature_engineering: False
# feature_selection: False
# scaling: False
preprocessing:
data:
train_data_file: "data/train.geojson"
test_data_file: "data/test.geojson"
train_output_file: "data/train_data_preprocessed.csv"
test_output_file: "data/test_data_preprocessed.csv"
train_masks_dir: "data/train_masks"
test_masks_dir: "data/test_masks"
target_col: "change_type" # Or whatever your target column is named in train.geojson
feature_offset: 1
num_dates: 5
option:
date_reordering_preprocessing: True # Set to False to skip date reordering
feature_engineering: True # Set to False to skip feature engineering steps
feature_selection: False # Set to True to perform feature selection
rasterization: False # Set to False to skip rasterization
data:
train_data_file: "data/train_data_preprocessed_date_reordering_preprocessingTrue_feature_engineeringTrue_feature_selectionFalse_rasterizationFalse.csv"
test_data_file: "data/test_data_preprocessed_date_reordering_preprocessingTrue_feature_engineeringTrue_feature_selectionFalse_rasterizationFalse.csv"
train_masks_dir: "data/train_masks"
test_masks_dir: "data/test_masks"
test_size: 0.2
random_state: 18
batch_size: 256
num_workers: 4
target_col: "target"
num_classes: 6
class_names: ['Demolition', 'Road', 'Residential', 'Commercial', 'Industrial', 'Mega Projects']
dynamic_feature_patterns: ["img_blue_mean", "img_blue_std", "img_green_mean", "img_green_std", "img_red_mean", "img_red_std", "pseudo_ndvi", "urban_idx", "time_delta", "change_status"]
models:
mlp:
model_name: "vanilla_mlp"
hidden_layers: [512, 512, 512, 256, 256, 256, 128, 128, 128]
dropout: 0
training:
epochs: 20
learning_rate: 0.001
weight_decay: 0
mlp_overfit:
model_name: "mlp_overfit"
hidden_layers: [512, 512, 512, 256, 256, 256, 128, 128, 128]
dropout: 0
training:
epochs: 1000
learning_rate: 0.1
weight_decay: 0
multimodal:
model_name: "multimodal_resnet"
hidden_layers: [512, 256, 128, 64]
dropout: 0.3
resnet_type: "resnet34" # or "resnet34", "resnet50"
training:
epochs: 50
learning_rate: 0.001
weight_decay: 0.00001
cnn_only:
model_name: "cnn_only_resnet"
hidden_layers: [0]
dropout: null
resnet_type: "resnet18" # Options: "resnet18", "resnet34", or "resnet50"
training:
epochs: 20
learning_rate: 0.001
weight_decay: 0.00001
multi_input_mlp:
model_name: "branching_mlp"
branches:
spectral:
columns: ['img_red_mean_date1','img_green_mean_date1','img_blue_mean_date1',
'img_red_std_date1','img_green_std_date1','img_blue_std_date1',
'img_red_mean_date2','img_green_mean_date2','img_blue_mean_date2',
'img_red_std_date2','img_green_std_date2','img_blue_std_date2',
'img_red_mean_date3','img_green_mean_date3','img_blue_mean_date3',
'img_red_std_date3','img_green_std_date3','img_blue_std_date3',
'img_red_mean_date4','img_green_mean_date4','img_blue_mean_date4',
'img_red_std_date4','img_green_std_date4','img_blue_std_date4',
'img_red_mean_date5','img_green_mean_date5','img_blue_mean_date5',
'img_red_std_date5','img_green_std_date5','img_blue_std_date5',
'delta_red_mean','delta_green_mean','delta_blue_mean',
'delta_red_std','delta_green_std','delta_blue_std',
'delta_red_green_ratio','delta_blue_red_ratio',
'pseudo_ndvi_t1','urban_idx_t1','red_green_ratio_t1','blue_green_ratio_t1',
'norm_var_red_t1','norm_var_green_t1','norm_var_blue_t1',
'pseudo_ndvi_t2','urban_idx_t2','red_green_ratio_t2','blue_green_ratio_t2',
'norm_var_red_t2','norm_var_green_t2','norm_var_blue_t2',
'pseudo_ndvi_t3','urban_idx_t3','red_green_ratio_t3','blue_green_ratio_t3',
'norm_var_red_t3','norm_var_green_t3','norm_var_blue_t3',
'pseudo_ndvi_t4','urban_idx_t4','red_green_ratio_t4','blue_green_ratio_t4',
'norm_var_red_t4','norm_var_green_t4','norm_var_blue_t4',
'pseudo_ndvi_t5','urban_idx_t5','red_green_ratio_t5','blue_green_ratio_t5',
'norm_var_red_t5','norm_var_green_t5','norm_var_blue_t5']
hidden_layers: [512, 256]
geometric:
columns: ['area', 'perimeter', 'shape_ratio', 'compactness',
'log_area', 'log_perimeter', 'log_shape_ratio', 'log_compactness',
'area_x_avg_lat', 'perimeter_x_avg_lon', 'shape_ratio_x_abs_lat',
'lat_lon_ratio', 'lat_long_ratio_vs_compactness']
hidden_layers: [256, 128]
geographical:
columns: ['geo_fine_Grass_Land','geo_fine_Lakes','geo_fine_Barren_Land',
'geo_fine_Desert','geo_fine_Dense_Forest','geo_fine_Hills','geo_fine_Snow',
'geo_fine_Sparse_Forest','geo_fine_Coastal','geo_fine_River',
'geo_coarse_Water','geo_coarse_Vegetation','geo_coarse_Barren',
'geo_coarse_Terrain','geo_coarse_Agriculture','geo_coarse_Unknown',
'terrain_complexity']
hidden_layers: [512, 256, 128]
urban:
columns: ['has_urban','has_rural','has_industrial','has_unknown',
'is_sparse','is_dense','is_slum']
hidden_layers: [256, 128, 128]
change_status:
columns: ['activity_frequency','has_construction_started','has_construction_completed','is_operational',
'initial_status_Construction Done','initial_status_Construction Midway','initial_status_Construction Started',
'initial_status_Excavation','initial_status_Greenland','initial_status_Land Cleared','initial_status_Materials Dumped',
'initial_status_Materials Introduced','initial_status_Operational','initial_status_Prior Construction','initial_status_nan',
'final_status_Construction Done','final_status_Construction Midway','final_status_Construction Started',
'final_status_Excavation','final_status_Greenland','final_status_Land Cleared','final_status_Materials Dumped',
'final_status_Materials Introduced','final_status_Operational','final_status_Prior Construction','final_status_nan',
'change_status_date0_Construction_Done','change_status_date0_Construction_Midway','change_status_date0_Construction_Started',
'change_status_date0_Excavation','change_status_date0_Greenland','change_status_date0_Land_Cleared','change_status_date0_Materials_Dumped',
'change_status_date0_Materials_Introduced','change_status_date0_Operational','change_status_date0_Prior_Construction',
'change_status_date1_Construction_Done','change_status_date1_Construction_Midway','change_status_date1_Construction_Started',
'change_status_date1_Excavation','change_status_date1_Greenland','change_status_date1_Land_Cleared','change_status_date1_Materials_Dumped',
'change_status_date1_Materials_Introduced','change_status_date1_Operational','change_status_date1_Prior_Construction',
'change_status_date2_Construction_Done','change_status_date2_Construction_Midway','change_status_date2_Construction_Started',
'change_status_date2_Excavation','change_status_date2_Greenland','change_status_date2_Land_Cleared','change_status_date2_Materials_Dumped',
'change_status_date2_Materials_Introduced','change_status_date2_Operational','change_status_date2_Prior_Construction']
hidden_layers: [512, 256, 128]
date_features:
columns: ['time_delta_date1','time_delta_date2','time_delta_date3','time_delta_date4','total_time_delta',
'date0d','date0m','date0y','date1d','date1m','date1y','date2d','date2m','date2y',
'date3d','date3m','date3y','date4d','date4m','date4y']
hidden_layers: [512, 256, 128]
coordinate_features:
columns: ['avg_lat','avg_lon']
hidden_layers: [256, 128, 128]
# MLP after concatenation
hidden_layers: [128, 128]
dropout: 0.2
training:
epochs: 20
learning_rate: 0.0001
weight_decay: 0.00001
rnn:
model_name: "lstm_with_mlp"
# LSTM-specific
hidden_size: 1024
num_layers: 5
dropout_lstm: 0.2
bidirectional: false
# MLP-specific
hidden_layers: [512, 512, 512, 256, 256, 256, 128, 128, 128]
dropout: 0.2
# Training
training:
epochs: 100
learning_rate: 0.00001
weight_decay: 0.000001
rf:
model_name: "random_forest"
grid_search: False # Set to false to skip grid search and use default_params
cv: 2
param_grid:
n_estimators: [100, 300, 500, 1000]
max_depth: [null, 10, 20, 30, 50]
min_samples_split: [2, 10, 20, 50]
min_samples_leaf: [1, 5, 10, 20]
default_params:
n_estimators: 1000
max_depth: 25
xgb:
model_name: "gb"
grid_search: False # Set to false to skip grid search and use default_params
cv: 2
param_grid:
n_estimators: [100, 300, 500, 1000]
max_depth: [null, 10, 20, 30, 50]
min_samples_split: [2, 10, 20, 50]
min_samples_leaf: [1, 5, 10, 20]
default_params:
n_estimators: 1000
max_depth: 40