geocif 0.2.27__tar.gz → 0.2.29__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.2.27/geocif.egg-info → geocif-0.2.29}/PKG-INFO +1 -1
- {geocif-0.2.27 → geocif-0.2.29}/geocif/geocif.py +3 -2
- {geocif-0.2.27 → geocif-0.2.29}/geocif/ml/feature_selection.py +3 -0
- {geocif-0.2.27 → geocif-0.2.29/geocif.egg-info}/PKG-INFO +1 -1
- {geocif-0.2.27 → geocif-0.2.29}/setup.py +1 -1
- {geocif-0.2.27 → geocif-0.2.29}/LICENSE +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/MANIFEST.in +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/README.md +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/__init__.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/agmet/__init__.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/agmet/geoagmet.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/agmet/plot.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/agmet/utils.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/analysis.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/backup/__init__.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/backup/constants.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/backup/features.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/backup/geo.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/backup/geocif.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/backup/metadata.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/backup/models.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/cei/__init__.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/cei/definitions.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/cei/indices.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/experiments.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/geocif_runner.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/indices_runner.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/indices_runner_angola.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/indices_runner_madagascar.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/indices_runner_malawi.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/indices_runner_mozambique.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/indices_runner_south_africa.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/indices_runner_zambia.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/indices_runner_zimbabwe.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/logger.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/ml/__init__.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/ml/correlations.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/ml/embedding.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/ml/feature_engineering.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/ml/outliers.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/ml/outlook.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/ml/output.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/ml/spatial_autocorrelation.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/ml/stages.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/ml/stats.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/ml/trainers.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/ml/trend.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/ml/xai.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/mm.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/playground/__init__.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/playground/aa.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/playground/area.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/playground/automl.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/playground/download_esi.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/playground/enso.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/playground/eval.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/playground/gamtest.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/playground/gee_access.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/playground/misc.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/playground/play_xagg.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/playground/reg.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/playground/sustain.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/playground/test_catboost.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/playground/tmp.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/playground/tmp2.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/playground/tmp3.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/playground/tmp4.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/playground/tmp5.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/playground/wolayita_maize_mask.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/risk/__init__.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/risk/impact_assessment.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/utils.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/viz/__init__.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/viz/gt.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/viz/plot.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif/viz/tmp.py +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif.egg-info/SOURCES.txt +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif.egg-info/dependency_links.txt +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif.egg-info/not-zip-safe +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/geocif.egg-info/top_level.txt +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/requirements.txt +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/setup.cfg +0 -0
- {geocif-0.2.27 → geocif-0.2.29}/tests/test_geocif.py +0 -0
@@ -238,11 +238,12 @@ class Geocif:
|
|
238
238
|
if "lon" not in self.selected_features and self.include_lat_lon_as_feature:
|
239
239
|
self.selected_features.append("lon")
|
240
240
|
|
241
|
-
def train_model(self, df_region, scaler=None):
|
241
|
+
def train_model(self, df_region, dir_output, scaler=None):
|
242
242
|
"""
|
243
243
|
|
244
244
|
Args:
|
245
245
|
df_region:
|
246
|
+
dir_output:
|
246
247
|
scaler:
|
247
248
|
|
248
249
|
Returns:
|
@@ -843,7 +844,7 @@ class Geocif:
|
|
843
844
|
self.y_train = df_region_train[self.target_column]
|
844
845
|
|
845
846
|
self.apply_feature_selector(region, dir_output)
|
846
|
-
self.train_model(df_region_train,
|
847
|
+
self.train_model(df_region_train, dir_output, scaler)
|
847
848
|
|
848
849
|
""" Predict """
|
849
850
|
if self.check_yield_trend:
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import os
|
2
|
+
|
1
3
|
import numpy as np
|
2
4
|
from tqdm import tqdm
|
3
5
|
from sklearn.ensemble import RandomForestRegressor
|
@@ -103,6 +105,7 @@ def select_features(
|
|
103
105
|
plt.tight_layout()
|
104
106
|
|
105
107
|
dir_output = dir_output / Path("feature_selection")
|
108
|
+
os.makedirs(dir_output, exist_ok=True)
|
106
109
|
fig.savefig(dir_output / f"feature_selection_frequency_{region}.png", dpi=300)
|
107
110
|
plt.close(fig)
|
108
111
|
|
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
|
File without changes
|