Skip to content

Commit

Permalink
bugfixing
Browse files Browse the repository at this point in the history
  • Loading branch information
JannisHoch committed Nov 11, 2020
1 parent bc73d80 commit a916f21
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion copro/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def create_X(config, polygon_gdf, conflict_gdf=None):

X = data.initiate_X_data(config)

X = data.fill_XY(X, config, conflict_gdf, polygon_gdf, make_proj=True)
X = data.fill_XY(X, config, conflict_gdf, polygon_gdf)

return X

Expand Down
4 changes: 4 additions & 0 deletions copro/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def nc_with_float_timestamp(extent_gdf, config, var_name, sim_year, stat_func='m
zonal_stats = rstats.zonal_stats(prov.geometry, nc_arr_vals, affine=affine, stats=stat_func)
list_out.append(zonal_stats[0][stat_func])

if config.getboolean('general', 'verbose'): print('DEBUG: ... done.')

return list_out

def nc_with_continous_datetime_timestamp(extent_gdf, config, var_name, sim_year, stat_func='mean'):
Expand Down Expand Up @@ -126,4 +128,6 @@ def nc_with_continous_datetime_timestamp(extent_gdf, config, var_name, sim_year,
zonal_stats = rstats.zonal_stats(prov.geometry, nc_arr_vals, affine=affine, stats=stat_func)
list_out.append(zonal_stats[0][stat_func])

if config.getboolean('general', 'verbose'): print('DEBUG: ... done.')

return list_out
2 changes: 1 addition & 1 deletion scripts/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def main(cfg, projection_settings=[], verbose=False):
CFG (str): (relative) path to cfg-file
"""


#- parsing settings-file and getting path to output folder
config, out_dir = copro.utils.initiate_setup(cfg)

Expand Down Expand Up @@ -64,6 +63,7 @@ def main(cfg, projection_settings=[], verbose=False):
#- create plot instance for ROC plots
fig, ax1 = plt.subplots(1, 1, figsize=(20,10))

click.echo('INFO: training and testing machine learning model')
#- go through all n model executions
for n in range(config.getint('settings', 'n_runs')):

Expand Down

0 comments on commit a916f21

Please sign in to comment.