geocif 0.1.47__tar.gz → 0.1.48__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.47/geocif.egg-info → geocif-0.1.48}/PKG-INFO +1 -1
- {geocif-0.1.47 → geocif-0.1.48}/geocif/geocif.py +2 -2
- {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/trainers.py +18 -3
- {geocif-0.1.47 → geocif-0.1.48/geocif.egg-info}/PKG-INFO +1 -1
- {geocif-0.1.47 → geocif-0.1.48}/setup.py +1 -1
- {geocif-0.1.47 → geocif-0.1.48}/LICENSE +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/MANIFEST.in +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/README.md +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/__init__.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/agmet/__init__.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/agmet/geoagmet.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/agmet/plot.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/agmet/utils.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/analysis.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/backup/__init__.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/backup/constants.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/backup/features.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/backup/geo.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/backup/geocif.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/backup/metadata.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/backup/models.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/cei/__init__.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/cei/definitions.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/cei/indices.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/experiments.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/indices_runner.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/indices_runner_v2.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/logger.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/__init__.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/correlations.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/embedding.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/feature_engineering.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/feature_selection.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/misc.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/outliers.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/outlook.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/output.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/spatial_autocorrelation.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/stages.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/stats.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/trend.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/xai.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/playground/__init__.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/playground/automl.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/playground/misc.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/utils.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/viz/__init__.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif/viz/plot.py +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif.egg-info/SOURCES.txt +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif.egg-info/dependency_links.txt +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif.egg-info/not-zip-safe +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/geocif.egg-info/top_level.txt +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/requirements.txt +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/setup.cfg +0 -0
- {geocif-0.1.47 → geocif-0.1.48}/tests/test_geocif.py +0 -0
@@ -11,7 +11,6 @@ import geopandas as gp
|
|
11
11
|
import matplotlib.pyplot as plt
|
12
12
|
import numpy as np
|
13
13
|
import pandas as pd
|
14
|
-
import sklearn
|
15
14
|
from tqdm import tqdm
|
16
15
|
|
17
16
|
from geocif import logger as log
|
@@ -28,7 +27,6 @@ from .ml import trend
|
|
28
27
|
from .ml import xai
|
29
28
|
|
30
29
|
plt.style.use("default")
|
31
|
-
sklearn.set_config(transform_output="pandas")
|
32
30
|
|
33
31
|
import warnings
|
34
32
|
|
@@ -304,6 +302,8 @@ class Geocif:
|
|
304
302
|
verbose=False,
|
305
303
|
# callbacks=[TQDMCallback(self.best_hyperparams["iterations"])],
|
306
304
|
)
|
305
|
+
elif self.model_name == "oblique":
|
306
|
+
self.model.fit(X_train, y_train)
|
307
307
|
elif self.model_name == "geospaNN":
|
308
308
|
self.model.fit(
|
309
309
|
X_train,
|
@@ -2,10 +2,7 @@ import multiprocessing as mp
|
|
2
2
|
|
3
3
|
import numpy as np
|
4
4
|
import optuna
|
5
|
-
import pandas as pd
|
6
5
|
from catboost import CatBoostRegressor
|
7
|
-
from sklearn.metrics import root_mean_squared_error
|
8
|
-
from sklearn.model_selection import train_test_split
|
9
6
|
from tqdm import tqdm
|
10
7
|
|
11
8
|
|
@@ -30,6 +27,8 @@ def loocv(
|
|
30
27
|
:param cat_features: list, list of categorical feature names
|
31
28
|
:return: float, average RMSE
|
32
29
|
"""
|
30
|
+
from sklearn.metrics import root_mean_squared_error
|
31
|
+
|
33
32
|
rmse_values = []
|
34
33
|
|
35
34
|
X = df[feature_names + cat_features]
|
@@ -81,6 +80,9 @@ def optuna_objective(model, df, feature_names, target_col, cat_features=[]):
|
|
81
80
|
Returns:
|
82
81
|
|
83
82
|
"""
|
83
|
+
from sklearn.metrics import root_mean_squared_error
|
84
|
+
from sklearn.model_selection import train_test_split
|
85
|
+
|
84
86
|
X = df[feature_names + cat_features]
|
85
87
|
y = df[target_col]
|
86
88
|
|
@@ -280,6 +282,19 @@ def auto_train(
|
|
280
282
|
hyperparams["iterations"] = 1000
|
281
283
|
regr = CatBoostRegressor(**hyperparams, cat_features=cat_features)
|
282
284
|
model = MERF(regr, max_iterations=10)
|
285
|
+
elif model_name == "oblique":
|
286
|
+
breakpoint()
|
287
|
+
from sktree.ensemble import ObliqueRandomForestRegressor
|
288
|
+
|
289
|
+
print("Training ObliqueRandomForestRegressor")
|
290
|
+
model = ObliqueRandomForestRegressor(
|
291
|
+
n_estimators=500,
|
292
|
+
max_depth=7,
|
293
|
+
n_jobs=-1,
|
294
|
+
verbose=2,
|
295
|
+
random_state=42,
|
296
|
+
)
|
297
|
+
print("Finished training ObliqueRandomForestRegressor")
|
283
298
|
elif model_name == "linear":
|
284
299
|
from sklearn.linear_model import LassoCV
|
285
300
|
|
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
|