|
|
|
|
| class FilePaths: |
| results_path = "results/" |
| saved_models_path = "saved_model_files/" |
| object_dict_path = "data/object_dicts/" |
| dataset_dict_path = "data/dataset_dicts/" |
| property_dict_path = "data/property_dicts/" |
| dataset_partition_path = "data/dataset_partitions/" |
|
|
|
|
| class Constants: |
| dataset_name = "Hague" |
| synthetic_folder_name = "example" |
| evaluation_mode = "matching" |
| dataset_size_version = 'medium' |
| matching_cands_generation = 'negative_sampling' |
| neg_samples_num = 2 |
| seeds_num = 1 |
| train_ratio = 0.6 |
| val_ratio = 0.2 |
| test_ratio = 1 - train_ratio - val_ratio |
| max_ratio_val = 1000 |
| load_object_dict = False |
| save_object_dict = True |
| load_train_items = False |
| save_property_dict = True |
| load_property_dict = False |
| save_dataset_dict = True |
| load_dataset_dict = False |
| file_name_suffix = 'allmodels_v1' |
| max_grid_cells = 20 |
|
|
|
|
| class TrainingPhase: |
| training_ratio = 0.5 |
| neg_pairs_ratio = 4 |
| run_preparatory_phase = True |
|
|
|
|
| class Features: |
| knn_buildings = 0 |
| knn_roads = 0 |
| operator = 'division' |
| object_properties = ["bounding_box_width", "bounding_box_length", "area", "perimeter", "perimeter_ind", |
| "volume", "convex_hull_area", "convex_hull_volume", "ave_centroid_distance", "height_diff", |
| "num_floors", "axes_symmetry", "compactness_2d", "compactness_3d", "density", |
| "elongation", "shape_ind", "hemisphericality", "fractality", "cubeness", "circumference", |
| "aligned_bounding_box_width", "aligned_bounding_box_length", "aligned_bounding_box_height", |
| "num_vertices"] |
|
|
| |
| normalization = 'log_transform' |
| neighborhood = [] |
| roads = [] |
|
|
|
|
| class Blocking: |
| blocking_method = 'bkafi' |
| |
| cand_pairs_per_item_list = [i for i in range(1, 21)] |
| nn_param = cand_pairs_per_item_list[-1] + 1 |
| nbits = 10 |
| |
| |
| bkafi_dim_list = [dim for dim in range(1, len(Features.object_properties))] |
| dist_threshold = None |
| sdr_factor = False |
| bkafi_criterion = 'feature_importance' |
| |
| neighborhood_radius = 500.0 |
| neighborhood_neg_ratio = 0.7 |
|
|
|
|
| class DataPartition: |
| grid_cell_size = 500.0 |
| train_ratio = 0.6 |
| contiguous_test = True |
| |
|
|
|
|
| class DisasterSimulation: |
| enabled = True |
| |
| crs_simulation = True |
| |
| damage_probability = 0.8 |
| min_damage_factor = 0.3 |
| max_damage_factor = 0.95 |
|
|
|
|
| class Alignment: |
| enabled = True |
| min_anchor_pairs = 3 |
| confidence_threshold = 0.8 |
| max_residual_threshold = 50.0 |
| alpha = 0.5 |
| output_crs = "EPSG:7415" |
| use_ransac = True |
| ransac_iterations = 1000 |
| ransac_inlier_threshold = 10.0 |
| spatial_sigma = 3.0 |
| |
| |
| post_align_knn_cutoff = 7.0 |
| |
| |
|
|
|
|
| class Models: |
| load_trained_models = False |
| cv = 3 |
| model_to_use = 'XGBClassifier' |
| model_list = ['XGBClassifier', |
| 'RandomForestClassifier', 'AdaBoostClassifier', 'MLPClassifier'] |
| blocking_model = 'RandomForestClassifier' |
| params_dict = { |
| 'RandomForestClassifier': {"n_estimators": [50], |
| "max_depth": [5], |
| "min_samples_split": [2], |
| "max_features": ["sqrt"]}, |
|
|
| 'SVC': {'C': [0.1, 0.5], |
| 'kernel': ['rbf'], |
| 'gamma': ['scale'], |
| 'degree': [2] |
| }, |
|
|
| 'LogisticRegression': {'solver': ['lbfgs', 'saga'], |
| 'multi_class': ['auto'], |
| 'C': [0.01, 0.1, 1] |
| }, |
|
|
| 'MLPClassifier': {'hidden_layer_sizes': [(64, 32)], |
| 'activation': ['relu'], |
| 'solver': ['adam'], |
| 'batch_size': [16], |
| 'max_iter': [500], |
| 'early_stopping': [True], |
| 'n_iter_no_change': [20], |
| }, |
|
|
| 'AdaBoostClassifier': {'n_estimators': [100], |
| 'learning_rate': [0.1], |
| 'algorithm': ['SAMME'] |
| }, |
|
|
| 'GradientBoostingClassifier': {'loss': ['log_loss'], |
| 'learning_rate': [0.1], |
| 'n_estimators': [100], |
| 'max_depth': [3], |
| 'min_samples_split': [3], |
| 'max_features': ['sqrt'] |
| }, |
|
|
| 'BaggingClassifier': {'n_estimators': [50], |
| 'max_samples': [0.8], |
| 'max_features': [0.8], |
| 'bootstrap': [True] |
| }, |
|
|
| 'XGBClassifier': {'max_depth': [4], |
| 'objective': ['binary:logistic'], |
| 'learning_rate': [0.1], |
| 'n_estimators': [100], |
| 'gamma': [0], |
| 'tree_method': ['hist'], |
| 'n_jobs': [4], |
| } |
| } |
|
|
|
|
|
|
|
|