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.
Files changed (55) hide show
  1. {geocif-0.1.47/geocif.egg-info → geocif-0.1.48}/PKG-INFO +1 -1
  2. {geocif-0.1.47 → geocif-0.1.48}/geocif/geocif.py +2 -2
  3. {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/trainers.py +18 -3
  4. {geocif-0.1.47 → geocif-0.1.48/geocif.egg-info}/PKG-INFO +1 -1
  5. {geocif-0.1.47 → geocif-0.1.48}/setup.py +1 -1
  6. {geocif-0.1.47 → geocif-0.1.48}/LICENSE +0 -0
  7. {geocif-0.1.47 → geocif-0.1.48}/MANIFEST.in +0 -0
  8. {geocif-0.1.47 → geocif-0.1.48}/README.md +0 -0
  9. {geocif-0.1.47 → geocif-0.1.48}/geocif/__init__.py +0 -0
  10. {geocif-0.1.47 → geocif-0.1.48}/geocif/agmet/__init__.py +0 -0
  11. {geocif-0.1.47 → geocif-0.1.48}/geocif/agmet/geoagmet.py +0 -0
  12. {geocif-0.1.47 → geocif-0.1.48}/geocif/agmet/plot.py +0 -0
  13. {geocif-0.1.47 → geocif-0.1.48}/geocif/agmet/utils.py +0 -0
  14. {geocif-0.1.47 → geocif-0.1.48}/geocif/analysis.py +0 -0
  15. {geocif-0.1.47 → geocif-0.1.48}/geocif/backup/__init__.py +0 -0
  16. {geocif-0.1.47 → geocif-0.1.48}/geocif/backup/constants.py +0 -0
  17. {geocif-0.1.47 → geocif-0.1.48}/geocif/backup/features.py +0 -0
  18. {geocif-0.1.47 → geocif-0.1.48}/geocif/backup/geo.py +0 -0
  19. {geocif-0.1.47 → geocif-0.1.48}/geocif/backup/geocif.py +0 -0
  20. {geocif-0.1.47 → geocif-0.1.48}/geocif/backup/metadata.py +0 -0
  21. {geocif-0.1.47 → geocif-0.1.48}/geocif/backup/models.py +0 -0
  22. {geocif-0.1.47 → geocif-0.1.48}/geocif/cei/__init__.py +0 -0
  23. {geocif-0.1.47 → geocif-0.1.48}/geocif/cei/definitions.py +0 -0
  24. {geocif-0.1.47 → geocif-0.1.48}/geocif/cei/indices.py +0 -0
  25. {geocif-0.1.47 → geocif-0.1.48}/geocif/experiments.py +0 -0
  26. {geocif-0.1.47 → geocif-0.1.48}/geocif/indices_runner.py +0 -0
  27. {geocif-0.1.47 → geocif-0.1.48}/geocif/indices_runner_v2.py +0 -0
  28. {geocif-0.1.47 → geocif-0.1.48}/geocif/logger.py +0 -0
  29. {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/__init__.py +0 -0
  30. {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/correlations.py +0 -0
  31. {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/embedding.py +0 -0
  32. {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/feature_engineering.py +0 -0
  33. {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/feature_selection.py +0 -0
  34. {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/misc.py +0 -0
  35. {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/outliers.py +0 -0
  36. {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/outlook.py +0 -0
  37. {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/output.py +0 -0
  38. {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/spatial_autocorrelation.py +0 -0
  39. {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/stages.py +0 -0
  40. {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/stats.py +0 -0
  41. {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/trend.py +0 -0
  42. {geocif-0.1.47 → geocif-0.1.48}/geocif/ml/xai.py +0 -0
  43. {geocif-0.1.47 → geocif-0.1.48}/geocif/playground/__init__.py +0 -0
  44. {geocif-0.1.47 → geocif-0.1.48}/geocif/playground/automl.py +0 -0
  45. {geocif-0.1.47 → geocif-0.1.48}/geocif/playground/misc.py +0 -0
  46. {geocif-0.1.47 → geocif-0.1.48}/geocif/utils.py +0 -0
  47. {geocif-0.1.47 → geocif-0.1.48}/geocif/viz/__init__.py +0 -0
  48. {geocif-0.1.47 → geocif-0.1.48}/geocif/viz/plot.py +0 -0
  49. {geocif-0.1.47 → geocif-0.1.48}/geocif.egg-info/SOURCES.txt +0 -0
  50. {geocif-0.1.47 → geocif-0.1.48}/geocif.egg-info/dependency_links.txt +0 -0
  51. {geocif-0.1.47 → geocif-0.1.48}/geocif.egg-info/not-zip-safe +0 -0
  52. {geocif-0.1.47 → geocif-0.1.48}/geocif.egg-info/top_level.txt +0 -0
  53. {geocif-0.1.47 → geocif-0.1.48}/requirements.txt +0 -0
  54. {geocif-0.1.47 → geocif-0.1.48}/setup.cfg +0 -0
  55. {geocif-0.1.47 → geocif-0.1.48}/tests/test_geocif.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: geocif
3
- Version: 0.1.47
3
+ Version: 0.1.48
4
4
  Summary: Models to visualize and forecast crop conditions and yields
5
5
  Home-page: https://ritviksahajpal.github.io/yield_forecasting/
6
6
  Author: Ritvik Sahajpal
@@ -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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: geocif
3
- Version: 0.1.47
3
+ Version: 0.1.48
4
4
  Summary: Models to visualize and forecast crop conditions and yields
5
5
  Home-page: https://ritviksahajpal.github.io/yield_forecasting/
6
6
  Author: Ritvik Sahajpal
@@ -50,6 +50,6 @@ setup(
50
50
  test_suite="tests",
51
51
  tests_require=test_requirements,
52
52
  url="https://ritviksahajpal.github.io/yield_forecasting/",
53
- version="0.1.47",
53
+ version="0.1.48",
54
54
  zip_safe=False,
55
55
  )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes