spotforecast2 0.1.1__tar.gz → 0.2.0__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 (47) hide show
  1. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/PKG-INFO +1 -1
  2. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/pyproject.toml +1 -1
  3. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/processing/n2n_predict.py +8 -1
  4. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/processing/n2n_predict_with_covariates.py +5 -1
  5. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/README.md +0 -0
  6. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/__init__.py +0 -0
  7. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/data/__init__.py +0 -0
  8. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/data/data.py +0 -0
  9. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/data/fetch_data.py +0 -0
  10. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/exceptions.py +0 -0
  11. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/forecaster/__init__.py +0 -0
  12. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/forecaster/base.py +0 -0
  13. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/forecaster/metrics.py +0 -0
  14. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/forecaster/recursive/__init__.py +0 -0
  15. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/forecaster/recursive/_forecaster_equivalent_date.py +0 -0
  16. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/forecaster/recursive/_forecaster_recursive.py +0 -0
  17. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/forecaster/recursive/_warnings.py +0 -0
  18. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/forecaster/utils.py +0 -0
  19. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/model_selection/__init__.py +0 -0
  20. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/model_selection/bayesian_search.py +0 -0
  21. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/model_selection/grid_search.py +0 -0
  22. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/model_selection/random_search.py +0 -0
  23. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/model_selection/split_base.py +0 -0
  24. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/model_selection/split_one_step.py +0 -0
  25. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/model_selection/split_ts_cv.py +0 -0
  26. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/model_selection/utils_common.py +0 -0
  27. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/model_selection/utils_metrics.py +0 -0
  28. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/model_selection/validation.py +0 -0
  29. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/preprocessing/__init__.py +0 -0
  30. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/preprocessing/_binner.py +0 -0
  31. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/preprocessing/_common.py +0 -0
  32. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/preprocessing/_differentiator.py +0 -0
  33. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/preprocessing/_rolling.py +0 -0
  34. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/preprocessing/curate_data.py +0 -0
  35. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/preprocessing/imputation.py +0 -0
  36. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/preprocessing/outlier.py +0 -0
  37. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/preprocessing/split.py +0 -0
  38. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/processing/agg_predict.py +0 -0
  39. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/py.typed +0 -0
  40. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/utils/__init__.py +0 -0
  41. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/utils/convert_to_utc.py +0 -0
  42. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/utils/data_transform.py +0 -0
  43. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/utils/forecaster_config.py +0 -0
  44. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/utils/generate_holiday.py +0 -0
  45. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/utils/validation.py +0 -0
  46. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/weather/__init__.py +0 -0
  47. {spotforecast2-0.1.1 → spotforecast2-0.2.0}/src/spotforecast2/weather/weather_client.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: spotforecast2
3
- Version: 0.1.1
3
+ Version: 0.2.0
4
4
  Summary: Forecasting with spot
5
5
  Author: bartzbeielstein
6
6
  Author-email: bartzbeielstein <32470350+bartzbeielstein@users.noreply.github.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "spotforecast2"
3
- version = "0.1.1"
3
+ version = "0.2.0"
4
4
  description = "Forecasting with spot"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -210,6 +210,7 @@ def _model_directory_exists(model_dir: Union[str, Path]) -> bool:
210
210
 
211
211
 
212
212
  def n2n_predict(
213
+ data: Optional[pd.DataFrame] = None,
213
214
  columns: Optional[List[str]] = None,
214
215
  forecast_horizon: int = 24,
215
216
  contamination: float = 0.01,
@@ -233,6 +234,8 @@ def n2n_predict(
233
234
  Existing models are reused for prediction unless force_train=True.
234
235
 
235
236
  Args:
237
+ data: Optional DataFrame with target time series data. If None, fetches data automatically.
238
+ Default: None.
236
239
  columns: List of target columns to forecast. If None, uses all available columns.
237
240
  Default: None.
238
241
  forecast_horizon: Number of time steps to forecast ahead. Default: 24.
@@ -314,7 +317,11 @@ def n2n_predict(
314
317
  print("Fetching data...")
315
318
 
316
319
  # Fetch data
317
- data = fetch_data(columns=TARGET)
320
+ if data is not None:
321
+ if TARGET is not None:
322
+ data = data[TARGET]
323
+ else:
324
+ data = fetch_data(columns=TARGET)
318
325
 
319
326
  START, END, COV_START, COV_END = get_start_end(
320
327
  data=data,
@@ -727,6 +727,7 @@ def _model_directory_exists(model_dir: Union[str, Path]) -> bool:
727
727
 
728
728
 
729
729
  def n2n_predict_with_covariates(
730
+ data: Optional[pd.DataFrame] = None,
730
731
  forecast_horizon: int = 24,
731
732
  contamination: float = 0.01,
732
733
  window_size: int = 72,
@@ -763,6 +764,8 @@ def n2n_predict_with_covariates(
763
764
  Existing models are reused for prediction unless force_train=True.
764
765
 
765
766
  Args:
767
+ data: Optional DataFrame with target time series data. If None, fetches data automatically.
768
+ Default: None.
766
769
  forecast_horizon: Number of time steps to forecast ahead. Default: 24.
767
770
  contamination: Contamination parameter for outlier detection. Default: 0.01.
768
771
  window_size: Rolling window size for gap detection. Default: 72.
@@ -865,7 +868,8 @@ def n2n_predict_with_covariates(
865
868
  if verbose:
866
869
  print("\n[1/9] Loading and preparing target data...")
867
870
 
868
- data = fetch_data()
871
+ if data is None:
872
+ data = fetch_data()
869
873
  target_columns = data.columns.tolist()
870
874
 
871
875
  if verbose:
File without changes