Open tommylees112 opened 5 years ago
This error is caused by the different shapes of the predicted/true xr.DataArray objects at data/models/{experiment}/{model}/*.nc
& data/features/{experiment}/train/{timestep}/*.nc
ipdb> pred_da
<xarray.DataArray 'preds' (lat: 224, lon: 176)>
array([[33.623024, 45.5946 , 36.096382, ..., nan, nan, nan],
[27.531542, 37.75934 , 37.770805, ..., nan, nan, nan],
[35.528862, 37.54693 , 43.118332, ..., nan, nan, nan],
...,
[49.296875, 55.80316 , 35.041126, ..., 18.268587, 26.510838, 17.255913],
[57.478218, 37.032967, 49.80915 , ..., 25.295422, 22.875132, 15.904449],
[43.87786 , 45.465843, 61.007156, ..., 24.108068, 28.35307 , 26.160402]],
dtype=float32)
Coordinates:
* lat (lat) float64 -5.175 -5.125 -5.075 -5.025 ... 5.875 5.925 5.975
* lon (lon) float64 33.52 33.57 33.62 33.68 ... 42.12 42.18 42.22 42.27
and the region_da
at ``
ipdb> region_da
<xarray.DataArray 'district_l2' (lat: 311, lon: 244)>
array([[nan, nan, nan, ..., nan, nan, nan],
[nan, nan, nan, ..., nan, nan, nan],
[nan, nan, nan, ..., nan, nan, nan],
...,
[nan, nan, nan, ..., nan, nan, nan],
[nan, nan, nan, ..., nan, nan, nan],
[nan, nan, nan, ..., nan, nan, nan]])
Coordinates:
* lat (lat) float64 -5.17 -5.134 -5.098 -5.062 ... 5.921 5.957 5.993
* lon (lon) float64 33.5 33.54 33.57 33.61 ... 42.14 42.18 42.21 42.25
Written some assert statements to çapture this error and give some more informative warnings!
AdministrativeRegionAnalysis
Produces the following error when trying to run the true vs. predicted for regions
Error Trace: