-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/urban heat islands #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
2b3b2ee
Merge pull request #1 from WUR-AI/restructuring-to-hydra
vdplasthijs de9cbff
Merge pull request #14 from WUR-AI/develop
vdplasthijs 065c8dc
Merge pull request #30 from WUR-AI/develop
gabrieletijunaityte db8c814
Update minor README
vdplasthijs b786e15
Merge pull request #31 from WUR-AI/vdplasthijs-patch-1
gabrieletijunaityte b8a86c5
Merge pull request #39 from WUR-AI/develop
gabrieletijunaityte ad0cd34
UrbanHeatIslands use case: Guatemala case
BachirNILU 6062168
Update base data (add feat_ + add parameter for spatial splitting)
BachirNILU 3f5705b
Add regression model/head
BachirNILU b4704c6
Add multimodel encoder (tabular+coords)
BachirNILU 6c20ebc
Readme: add diagram
BachirNILU d268a29
update comments
BachirNILU 0a12fbe
docs: move diagram to docs/figures/
BachirNILU c0ea0dd
docs: move diagram to docs/figures/
BachirNILU d020d27
Merge remote-tracking branch 'origin/develop' into feature/urban-heat…
BachirNILU 4ce0ed8
Removing output_normalization='l2'
BachirNILU 109d307
data config + split_dir fixed
BachirNILU 114b75d
FIx the need and remove split_dir parameter
gabrieletijunaityte e10e5ad
Merge branch 'develop' into feature/urban-heat-islands
vdplasthijs 30a11fb
fix: wire head, trainable modules, F.normalize, use_features param
BachirNILU e24ff52
fix: remove redundant _tabular_ready check in __init__
BachirNILU 2044081
Delete split_indices_heat_guatemala_2026-02-20-1148.pth
gabrieletijunaityte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| _target_: src.data.base_datamodule.BaseDataModule | ||
|
|
||
| dataset: | ||
| _target_: src.data.heat_guatemala_dataset.HeatGuatemalaDataset | ||
| data_dir: ${paths.data_dir} | ||
| modalities: | ||
| coords: {} | ||
| use_target_data: true | ||
| use_features: true | ||
| use_aux_data: false | ||
| seed: ${seed} | ||
| cache_dir: ${paths.cache_dir} | ||
|
|
||
| batch_size: 64 | ||
| num_workers: 8 | ||
| pin_memory: true | ||
|
|
||
| split_mode: "from_file" | ||
| save_split: false | ||
| saved_split_file_name: "split_indices_heat_guatemala_2026-02-20-1148.pth" | ||
|
|
||
|
|
||
| train_val_test_split: [0.7, 0.15, 0.15] | ||
| seed: ${seed} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # @package _global_ | ||
| # configs/experiment/heat_guatemala_coords_reg.yaml | ||
| # Variant A: GeoClip coordinates only | ||
|
|
||
|
|
||
| defaults: | ||
| - override /model: heat_geoclip_reg | ||
| - override /data: heat_guatemala | ||
|
|
||
| tags: ["heat_island", "guatemala", "coords_only", "regression"] | ||
| seed: 12345 | ||
|
|
||
| trainer: | ||
| min_epochs: 1 | ||
| max_epochs: 50 | ||
|
|
||
| data: | ||
| batch_size: 64 | ||
|
|
||
| logger: | ||
| wandb: | ||
| tags: ${tags} | ||
| group: "heat_island" | ||
| aim: | ||
| experiment: "heat_island" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # @package _global_ | ||
| # configs/experiment/heat_guatemala_fusion_reg.yaml | ||
| # Variant C: GeoClip + tabular fusion | ||
|
|
||
|
|
||
| defaults: | ||
| - override /model: heat_fusion_reg | ||
| - override /data: heat_guatemala | ||
|
|
||
| tags: ["heat_island", "guatemala", "fusion", "regression"] | ||
| seed: 12345 | ||
|
|
||
| trainer: | ||
| min_epochs: 1 | ||
| max_epochs: 50 | ||
|
|
||
| data: | ||
| batch_size: 64 | ||
|
|
||
| logger: | ||
| wandb: | ||
| tags: ${tags} | ||
| group: "heat_island" | ||
| aim: | ||
| experiment: "heat_island" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # @package _global_ | ||
| # configs/experiment/heat_guatemala_tabular_reg.yaml | ||
| # Variant B: tabular features only | ||
|
|
||
|
|
||
| defaults: | ||
| - override /model: heat_tabular_reg | ||
| - override /data: heat_guatemala | ||
|
|
||
| tags: ["heat_island", "guatemala", "tabular_only", "regression"] | ||
| seed: 12345 | ||
|
|
||
| trainer: | ||
| min_epochs: 1 | ||
| max_epochs: 50 | ||
|
|
||
| data: | ||
| batch_size: 64 | ||
|
|
||
| logger: | ||
| wandb: | ||
| tags: ${tags} | ||
| group: "heat_island" | ||
| aim: | ||
| experiment: "heat_island" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # configs/model/heat_fusion_reg.yaml | ||
| # | ||
| # Renamed from: predictive_geoclip_tabular_regression.yaml | ||
| # Reason: "fusion" is concise; "heat_" scopes to this use case. | ||
| # | ||
| # Variant: GeoClip (coords) + tabular fusion | ||
| # Encoder output = GeoClip (512) + tabular projection (64) = 576-dim | ||
|
|
||
| _target_: src.models.predictive_model_regression.PredictiveRegressionModel | ||
|
|
||
| eo_encoder: | ||
| _target_: src.models.components.eo_encoders.multimodal_encoder.MultiModalEncoder | ||
| use_coords: true | ||
| use_tabular: true | ||
| tab_embed_dim: 64 | ||
|
|
||
| prediction_head: | ||
| _target_: src.models.components.pred_heads.mlp_regression_head.MLPRegressionPredictionHead | ||
| nn_layers: 2 | ||
| hidden_dim: 256 | ||
|
|
||
| # GeoClip frozen; tabular projection + head are trained. | ||
| trainable_modules: [eo_encoder, prediction_head] | ||
|
|
||
| optimizer: | ||
| _target_: torch.optim.Adam | ||
| _partial_: true | ||
| lr: 0.001 | ||
| weight_decay: 0.0 | ||
|
|
||
| scheduler: | ||
| _target_: torch.optim.lr_scheduler.ReduceLROnPlateau | ||
| _partial_: true | ||
| mode: min | ||
| factor: 0.1 | ||
| patience: 10 | ||
|
|
||
| loss_fn: | ||
| _target_: torch.nn.MSELoss |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # configs/model/heat_geoclip_reg.yaml | ||
| # | ||
| # Renamed from: predictive_geoclip_regression.yaml | ||
| # Reason: prefixing with "heat_" scopes it to this use case; | ||
| # "geoclip_reg" is concise and descriptive. | ||
| # | ||
| # Variant: coords only (GeoClip encodes lat/lon → 512-dim embedding) | ||
|
|
||
| _target_: src.models.predictive_model_regression.PredictiveRegressionModel | ||
|
|
||
| eo_encoder: | ||
| _target_: src.models.components.eo_encoders.multimodal_encoder.MultiModalEncoder | ||
| use_coords: true | ||
| use_tabular: false | ||
|
|
||
| prediction_head: | ||
| _target_: src.models.components.pred_heads.mlp_regression_head.MLPRegressionPredictionHead | ||
| nn_layers: 2 | ||
| hidden_dim: 256 | ||
|
|
||
| # Only the prediction head is trained; GeoClip encoder is frozen. | ||
| trainable_modules: [prediction_head] | ||
|
|
||
| optimizer: | ||
| _target_: torch.optim.Adam | ||
| _partial_: true | ||
| lr: 0.001 | ||
| weight_decay: 0.0 | ||
|
|
||
| scheduler: | ||
| _target_: torch.optim.lr_scheduler.ReduceLROnPlateau | ||
| _partial_: true | ||
| mode: min | ||
| factor: 0.1 | ||
| patience: 10 | ||
|
|
||
| loss_fn: | ||
| _target_: torch.nn.MSELoss |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # configs/model/heat_tabular_reg.yaml | ||
| # | ||
| # Renamed from: predictive_tabular_regression.yaml | ||
| # Reason: prefixed with "heat_" to scope to this use case. | ||
| # | ||
| # Variant: tabular only (feat_* CSV columns encoded by a small MLP) | ||
| # | ||
| # NOTE: tabular_dim is NOT hardcoded here. | ||
| # It is resolved automatically at runtime: | ||
| # 1. HeatGuatemalaDataset.tabular_dim reads len(feat_names) from the CSV. | ||
| # 2. BaseDataModule.tabular_dim delegates to the train dataset. | ||
| # 3. PredictiveRegressionModel.setup() calls | ||
| # self.eo_encoder.build_tabular_branch(self.trainer.datamodule.tabular_dim) | ||
|
|
||
| _target_: src.models.predictive_model_regression.PredictiveRegressionModel | ||
|
|
||
| eo_encoder: | ||
| _target_: src.models.components.eo_encoders.multimodal_encoder.MultiModalEncoder | ||
| use_coords: false | ||
| use_tabular: true | ||
| tab_embed_dim: 64 | ||
|
|
||
| prediction_head: | ||
| _target_: src.models.components.pred_heads.mlp_regression_head.MLPRegressionPredictionHead | ||
| nn_layers: 2 | ||
| hidden_dim: 256 | ||
|
|
||
| # Both encoder and head have trainable parameters. | ||
| trainable_modules: [eo_encoder, prediction_head] | ||
|
|
||
| optimizer: | ||
| _target_: torch.optim.Adam | ||
| _partial_: true | ||
| lr: 0.001 | ||
| weight_decay: 0.0001 | ||
|
|
||
| scheduler: | ||
| _target_: torch.optim.lr_scheduler.ReduceLROnPlateau | ||
| _partial_: true | ||
| mode: min | ||
| factor: 0.1 | ||
| patience: 10 | ||
|
|
||
| loss_fn: | ||
| _target_: torch.nn.MSELoss |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.