geocif 0.1.69__tar.gz → 0.1.70__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {geocif-0.1.69/geocif.egg-info → geocif-0.1.70}/PKG-INFO +1 -1
- {geocif-0.1.69 → geocif-0.1.70}/geocif/cei/indices.py +1 -1
- {geocif-0.1.69 → geocif-0.1.70}/geocif/geocif.py +24 -1
- {geocif-0.1.69 → geocif-0.1.70}/geocif/indices_runner_south_africa.py +2 -2
- {geocif-0.1.69 → geocif-0.1.70/geocif.egg-info}/PKG-INFO +1 -1
- {geocif-0.1.69 → geocif-0.1.70}/setup.py +1 -1
- {geocif-0.1.69 → geocif-0.1.70}/LICENSE +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/MANIFEST.in +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/README.md +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/__init__.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/agmet/__init__.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/agmet/geoagmet.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/agmet/plot.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/agmet/utils.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/analysis.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/backup/__init__.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/backup/constants.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/backup/features.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/backup/geo.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/backup/geocif.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/backup/metadata.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/backup/models.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/cei/__init__.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/cei/definitions.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/experiments.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/geocif_runner.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/indices_runner.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/indices_runner_angola.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/indices_runner_madagascar.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/indices_runner_malawi.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/indices_runner_mozambique.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/indices_runner_zambia.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/indices_runner_zimbabwe.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/logger.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/ml/__init__.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/ml/correlations.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/ml/embedding.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/ml/feature_engineering.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/ml/feature_selection.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/ml/outliers.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/ml/outlook.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/ml/output.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/ml/spatial_autocorrelation.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/ml/stages.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/ml/stats.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/ml/trainers.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/ml/trend.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/ml/xai.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/mm.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/playground/__init__.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/playground/aa.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/playground/area.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/playground/automl.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/playground/download_esi.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/playground/enso.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/playground/eval.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/playground/gamtest.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/playground/gee_access.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/playground/misc.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/playground/play_xagg.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/playground/reg.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/playground/sustain.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/playground/test_catboost.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/playground/tmp.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/playground/tmp2.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/playground/tmp3.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/playground/tmp4.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/playground/tmp5.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/playground/wolayita_maize_mask.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/risk/__init__.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/risk/impact_assessment.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/utils.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/viz/__init__.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/viz/gt.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/viz/plot.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif/viz/tmp.py +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif.egg-info/SOURCES.txt +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif.egg-info/dependency_links.txt +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif.egg-info/not-zip-safe +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/geocif.egg-info/top_level.txt +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/requirements.txt +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/setup.cfg +0 -0
- {geocif-0.1.69 → geocif-0.1.70}/tests/test_geocif.py +0 -0
@@ -675,7 +675,7 @@ class CEIs:
|
|
675
675
|
elif "STD" in iname:
|
676
676
|
val = np.nanstd(eo_vals)
|
677
677
|
elif "AUC" in iname:
|
678
|
-
val = np.trapz(eo_vals
|
678
|
+
val = np.trapz(eo_vals)
|
679
679
|
elif "H-INDEX" in iname:
|
680
680
|
# Multiply by 10 for h-index to work
|
681
681
|
val = utils.compute_h_index(eo_vals * 10)
|
@@ -997,6 +997,25 @@ class Geocif:
|
|
997
997
|
if self.use_single_time_period_as_feature:
|
998
998
|
df = stages.select_single_time_period_features(df)
|
999
999
|
|
1000
|
+
# If forecasting for current season, then exclude the latest month data as it will be partial
|
1001
|
+
# and will confuse the model
|
1002
|
+
if self.forecast_season == self.today_year:
|
1003
|
+
current_month = ar.utcnow().month
|
1004
|
+
|
1005
|
+
# Identify columns where the second chunk equals the current month index
|
1006
|
+
cols_to_drop = []
|
1007
|
+
for col in df.columns:
|
1008
|
+
if "_" in col:
|
1009
|
+
mon = stages.get_stage_information_dict(col, self.method)['Starting Stage']
|
1010
|
+
|
1011
|
+
if mon == current_month:
|
1012
|
+
cols_to_drop.append(col)
|
1013
|
+
|
1014
|
+
# Drop those columns
|
1015
|
+
|
1016
|
+
df = df.drop(columns=cols_to_drop)
|
1017
|
+
|
1018
|
+
# Hack: If
|
1000
1019
|
# Change column name
|
1001
1020
|
# e.g. 'vDTR_7_6_5_4_3_2_1_37_36_35_34_33_32_31' to 'vDTR Mar 1-Oct 27'
|
1002
1021
|
df = stages.update_feature_names(df, self.method)
|
@@ -1343,7 +1362,11 @@ class Geocif:
|
|
1343
1362
|
# e.g. _stages = ['13_12_11', '13_12_11_10', '13_12_11_10_9']
|
1344
1363
|
# then self.simulation_stages = [array([13, 12, 11]), array([13, 12, 11, 10]), array([13, 12, 11, 10, 9])]
|
1345
1364
|
# Drop stages in self.all_stages that do not have _ in them
|
1346
|
-
self.all_stages = [element for element in self.all_stages if "_" in element]
|
1365
|
+
# self.all_stages = [element for element in self.all_stages if "_" in element]
|
1366
|
+
|
1367
|
+
if self.forecast_season == self.today_year:
|
1368
|
+
current_month = ar.utcnow().month
|
1369
|
+
self.all_stages = [elem for elem in self.all_stages if not elem.startswith(str(current_month))]
|
1347
1370
|
|
1348
1371
|
self.simulation_stages = [
|
1349
1372
|
np.array([int(stage) for stage in s.split("_")]) for s in self.all_stages
|
@@ -162,7 +162,7 @@ class cei_runner(base.BaseGeo):
|
|
162
162
|
category,
|
163
163
|
year,
|
164
164
|
"ndvi",
|
165
|
-
|
165
|
+
True, # redo
|
166
166
|
)
|
167
167
|
for year in range(2001, ar.utcnow().year + 1)
|
168
168
|
for status, path, filename, admin_zone, category in combinations
|
@@ -174,7 +174,7 @@ class cei_runner(base.BaseGeo):
|
|
174
174
|
combinations = [i for i in combinations if f"{country}_maize_s1" in i[3]]
|
175
175
|
|
176
176
|
if True:
|
177
|
-
num_cpu = int(cpu_count() * 0.
|
177
|
+
num_cpu = int(cpu_count() * 0.8)
|
178
178
|
with Pool(num_cpu) as p:
|
179
179
|
for i, _ in enumerate(p.imap_unordered(indices.process, combinations)):
|
180
180
|
pass
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|