Salinty.csv and Temperature.csv aquired from SIO https://shorestations.ucsd.edu/publications/data/ scoos_HAB_SIO.csv from https://habs.sccoos.org/scripps-pier
Code/
└─ Scripts/
├─ configs/
│ └─ biolum_config.yaml ← example configuration
├─ outputs/
│ └─ bloom_forecast.json ← generated after running inference
└─ forecast.py ← inference script
- Navigate to
Code/Scripts/configs/. - Copy the sample file or create a new one, e.g.:
cp biolum_config.yaml my_config.yaml- Edit the new file (
my_config.yaml) and fill in each variable:
| Key | Description |
|---|---|
data_path |
Path to the “back-up” dataset used for predictions |
parameters_path_1wk |
Path to the 1-week model parameters |
parameters_path_2wk |
Path to the 2-week model parameters |
parameters_path_3wk |
Path to the 3-week model parameters |
target |
Name of the variable to forecast |
json_key_path |
Google Drive service-account JSON key file |
bloom_thresh |
Threshold: if a single model’s forecast ≥ this value, classify as “bloom” |
samp |
Use every samp-th model to reduce over-fitting |
n |
Total number of models in the ensemble |
p |
Percentage of models that must predict “bloom” for the final label Likely |
Tip: Keep paths relative to
Code/Scripts/when possible to simplify execution.
Example snippet:
# my_config.yaml
data_path: "../Data/d1carter_data_w_gaps.csv"
parameters_path_1wk: "/Users/athulithparaselli/Documents/GitHub/HAB-Prediction-Research/Code/Results/1000_sample_biolum_1_wk.csv"
parameters_path_2wk: "/Users/athulithparaselli/Documents/GitHub/HAB-Prediction-Research/Code/Results/1000_sample_biolum_2_wk.csv"
parameters_path_3wk: "/Users/athulithparaselli/Documents/GitHub/HAB-Prediction-Research/Code/Results/1000_sample_biolum_3_wk.csv"
target: "Lingulodinium_polyedra"
json_key_path: "/Users/athulithparaselli/Documents/GitHub/HAB-Prediction-Research/Code/APIKey/sacred-truck-461716-t5-2a6499bf0869.json"
bloom_thresh: 11733.399999999963
samp: 40
n: 750
p: 0.3- Visit https://console.cloud.google.com.
- Create (or select) a project and enable the Google Drive API.
- Navigate to APIs & Services → Credentials → + Create Credential → Service account key.
- Choose JSON as the key type and download the file.
- Save the file to a secure location (e.g.,
Code/Scripts/secrets/) and updatejson_key_pathin your YAML.
From Code/Scripts/:
python3 forecast.py configs/my_config.yaml- Replace
my_config.yamlwith the name of your configuration file. - The script will read the config, load models, and produce forecasts.
- A JSON file named
bloom_forecast.jsonis written to:
Code/Scripts/outputs/bloom_forecast.json
This file contains the predicted bloom likelihoods and confidence intervals for the upcoming weeks.
You’re all set! Customize your YAML, run the command, and check the output JSON for your bloom forecasts.