geocif 0.2.72__tar.gz → 0.2.74__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.72/geocif.egg-info → geocif-0.2.74}/PKG-INFO +1 -1
- {geocif-0.2.72 → geocif-0.2.74}/geocif/ml/feature_selection.py +20 -18
- {geocif-0.2.72 → geocif-0.2.74/geocif.egg-info}/PKG-INFO +1 -1
- {geocif-0.2.72 → geocif-0.2.74}/setup.py +1 -1
- {geocif-0.2.72 → geocif-0.2.74}/LICENSE +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/MANIFEST.in +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/README.md +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/__init__.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/agmet/__init__.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/agmet/geoagmet.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/agmet/plot.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/agmet/utils.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/analysis.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/backup/__init__.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/backup/constants.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/backup/features.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/backup/geo.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/backup/geocif.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/backup/metadata.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/backup/models.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/cei/__init__.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/cei/definitions.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/cei/indices.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/experiments.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/geocif.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/geocif_runner.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/indices_runner.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/indices_runner_algeria.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/indices_runner_angola.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/indices_runner_madagascar.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/indices_runner_malawi.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/indices_runner_mozambique.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/indices_runner_south_africa.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/indices_runner_zambia.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/indices_runner_zimbabwe.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/logger.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/ml/__init__.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/ml/correlations.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/ml/embedding.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/ml/feature_engineering.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/ml/outliers.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/ml/outlook.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/ml/output.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/ml/spatial_autocorrelation.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/ml/stages.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/ml/stats.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/ml/trainers.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/ml/trend.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/ml/xai.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/mm.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/__init__.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/aa.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/aaaa.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/area.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/automl.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/download_esi.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/enso.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/eval.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/gamtest.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/gee_access.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/misc.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/play_xagg.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/reg.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/sustain.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/test_catboost.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/tmp.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/tmp2.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/tmp3.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/tmp4.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/tmp5.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/wolayita.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/wolayita_maize_mask.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/wolayita_v2.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/playground/wolayita_v3.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/risk/__init__.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/risk/impact_assessment.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/utils.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/viz/__init__.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/viz/gt.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/viz/plot.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/viz/tmp.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif/viz/viz_ml.py +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif.egg-info/SOURCES.txt +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif.egg-info/dependency_links.txt +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif.egg-info/not-zip-safe +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/geocif.egg-info/top_level.txt +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/requirements.txt +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/setup.cfg +0 -0
- {geocif-0.2.72 → geocif-0.2.74}/tests/test_geocif.py +0 -0
@@ -253,24 +253,26 @@ def select_features(
|
|
253
253
|
from collections import Counter
|
254
254
|
import itertools as it
|
255
255
|
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
256
|
+
try:
|
257
|
+
region_selected = {} # {region: [features …]}
|
258
|
+
for region in tqdm(X_clean["Region"].unique(), desc="BorutaPy", leave=False):
|
259
|
+
idx = X_clean["Region"] == region
|
260
|
+
X_region = X_clean.loc[idx].drop(columns=["Region"])
|
261
|
+
y_region = y.loc[idx] if hasattr(y, "loc") else y[idx]
|
262
|
+
|
263
|
+
sel = BorutaPy(
|
264
|
+
estimator=forest,
|
265
|
+
n_estimators="auto",
|
266
|
+
random_state=42,
|
267
|
+
verbose=0
|
268
|
+
)
|
269
|
+
sel.fit(X_region.values, y_region.values)
|
270
|
+
|
271
|
+
region_selected[region] = (
|
272
|
+
X_region.columns[sel.support_ | sel.support_weak_].tolist()
|
273
|
+
)
|
274
|
+
except Exception as e:
|
275
|
+
breakpoint()
|
274
276
|
|
275
277
|
# ─── 3. keep features chosen in ≥ 2 regions ------------------------------
|
276
278
|
counts = Counter(it.chain.from_iterable(region_selected.values()))
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|