MCPcopy Create free account

hub / github.com/unit8co/darts / functions

Functions3,734 in github.com/unit8co/darts

↓ 23 callersMethodtransform
For each data transformer in pipeline transform data. Then transformed data is passed to next transformer. Parameters ------
darts/dataprocessing/pipeline.py:156
↓ 22 callersMethod_assert_univariate
(self, series: TimeSeries)
darts/models/forecasting/forecasting_model.py:2758
↓ 22 callersMethodget_index_at_point
Convert a point along the time index into an integer index ranging from (0, len(series)-1) inclusive. Parameters ---------- p
darts/timeseries.py:2374
↓ 22 callersMethodwith_hierarchy
Return a new series with added hierarchy. Parameters ---------- hierarchy A dictionary mapping components to a li
darts/timeseries.py:3407
↓ 21 callersFunction_get_wrapped_metric
Returns the inner metric function `func` which bypasses the decorators `multi_ts_support` and `multivariate_support`. It significantly decreases p
darts/metrics/utils.py:768
↓ 21 callersMethodcomponent_names
Generates names for the parameters of the Likelihood.
darts/utils/likelihood_models/base.py:72
↓ 21 callersMethodpredict
(*args)
darts/tests/models/forecasting/test_classifier_model.py:1154
↓ 21 callersFunctiontrain_model
( *args, model_type="regression", model_params=None, quantiles=None, **kwargs )
darts/tests/models/forecasting/test_conformal_model.py:46
↓ 20 callersMethodcumsum
Return a new series with the cumulative sum along the time axis. Returns ------- TimeSeries A new series, with th
darts/timeseries.py:3041
↓ 20 callersMethoddrop_after
Return a new series where everything after (and in-/excluding) the provided time `split_point` was dropped. The timestamp may not be in the s
darts/timeseries.py:2534
↓ 20 callersMethodfrom_group_dataframe
Create a list of ``TimeSeries`` grouped by a selection of columns from a `DataFrame`. One column (or the DataFrame index) has to represent th
darts/timeseries.py:863
↓ 20 callersFunctionmake_dataset
(rows, cols)
darts/tests/utils/test_model_selection.py:7
↓ 20 callersFunctionn_steps_between
Get the number of time steps with a given frequency `freq` between `end` and `start`. Works for both integers and time stamps. * if `end`, `s
darts/utils/utils.py:384
↓ 20 callersMethodunivariate_component
Return a new univariate series with a selected component. This drops the hierarchy (if any), and retains only the relevant static covariates
darts/timeseries.py:3539
↓ 20 callersMethodwith_values
Return a new series similar to this one but with new `values`. Parameters ---------- values A Numpy array with ne
darts/timeseries.py:3315
↓ 19 callersFunctioneval_metric_from_scores
Computes a score/metric between anomaly scores against true anomalies. `anomalies` and `pred_scores` must have the same shape. `anomalies` mu
darts/ad/utils.py:37
↓ 19 callersMethodget_estimator
Returns the estimator that forecasts the step ``horizon`` of the target component ``target_dim``. For probabilistic models fitting quantiles,
darts/models/forecasting/sklearn_model.py:634
↓ 19 callersMethodinverse_transform
For each data transformer in the pipeline, inverse-transform data. Then inverse transformed data is passed to the next transformer. T
darts/dataprocessing/pipeline.py:181
↓ 19 callersFunctionset_option
Sets the value of the specified option. Available Options: - display.[max_rows, max_cols] - plotting.use_darts_style Parameter
darts/config.py:390
↓ 18 callersFunction_make_ts
(start_value=0, n=100)
darts/tests/models/forecasting/test_ensemble_models.py:37
↓ 18 callersMethodcreate_multivariate_linear_timeseries
Helper function that creates a `linear_timeseries` with a specified number of components. To help distinguish each component from one
darts/tests/utils/tabularization/test_create_lagged_prediction_data.py:42
↓ 18 callersMethodprepend_values
Return a new series with `values` prepended to this series along the time axis (added to the beginning). This adds time steps to the beginnin
darts/timeseries.py:3206
↓ 18 callersMethodsample
(self, model_output: torch.Tensor)
darts/utils/likelihood_models/torch.py:502
↓ 18 callersFunctionsetup_lazy_imports
Create ``__all__``, ``__getattr__``, and ``__dir__`` for a lazy package. Parameters ---------- lazy_imports Mapping of public att
darts/utils/_lazy.py:8
↓ 17 callersMethod__init__
Beta distribution. https://en.wikipedia.org/wiki/Beta_distribution - Univariate continuous distribution. - Support:
darts/utils/likelihood_models/torch.py:463
↓ 17 callersFunctionadd_static_covariates_to_lagged_data
Add static covariates to the features' table for SKLearnModels. If `uses_static_covariates=True`, all target series used in `fit()` and `pred
darts/utils/data/tabularization/tabularization.py:736
↓ 17 callersMethodgridsearch
Find the best hyper-parameters among a given set using a grid search. This function has 3 modes of operation: Expanding window mode,
darts/models/forecasting/forecasting_model.py:1630
↓ 17 callersFunctionmape
Mean Absolute Percentage Error (MAPE). For the true series :math:`y` and predicted series :math:`\\hat{y}` of length :math:`T`, it is computed as
darts/metrics/metrics.py:1625
↓ 17 callersMethodstd
Return a deterministic series with the standard deviation of each component computed over the samples of the stochastic series. This
darts/timeseries.py:4893
↓ 16 callersMethodeval_metric_from_prediction
Computes the anomaly score between `series` and `pred_series`, and returns the score of an agnostic threshold metric. Parameters
darts/ad/scorers/scorers.py:125
↓ 16 callersMethodgenerate_inference_idx
Generates/extracts time index (or integer index) for covariates at model inference / prediction time. Parameters ----------
darts/dataprocessing/encoders/encoder_base.py:132
↓ 15 callersMethod_assert_eq_schema
(self, left: dict, right: dict)
darts/tests/utils/torch_datasets/test_torch_datasets.py:39
↓ 15 callersMethod_get_lags
If lags were specified in a component-wise manner, they are contained in self.component_lags and the values in self.lags should be ig
darts/models/forecasting/sklearn_model.py:473
↓ 15 callersFunction_package_available
(*names: str)
darts/tests/conftest.py:20
↓ 15 callersMethodencode_inference
Returns encoded index for all past and/or future covariates for inference/prediction. Which covariates are generated depends on the parameters
darts/dataprocessing/encoders/encoders.py:1094
↓ 15 callersMethodencode_train
Each subclass must implement a method to encode the covariates index for training. Parameters ---------- target T
darts/dataprocessing/encoders/encoder_base.py:483
↓ 15 callersMethodfilter
Sequentially applies the Kalman filter on the provided series of observations. Parameters ---------- series
darts/models/filtering/kalman_filter.py:141
↓ 15 callersMethodfit
(self, series: TimeSeries, verbose: bool | None = None)
darts/models/forecasting/exponential_smoothing.py:122
↓ 15 callersMethodgaps
Compute and return gaps in the series. Works only on deterministic time series (1 sample). Parameters ---------- mod
darts/timeseries.py:2293
↓ 15 callersFunctionrmse
Root Mean Squared Error (RMSE). For the true series :math:`y` and predicted series :math:`\\hat{y}` of length :math:`T`, it is computed per c
darts/metrics/metrics.py:1112
↓ 15 callersFunctionslice_intersect
Returns a list of series, where all series have been intersected along the time index. Parameters ---------- series sequence of `
darts/timeseries.py:6139
↓ 14 callersMethod_extract_pl_module_params
Extract params from model creation to set up PLForecastingModule (the actual torch.nn.Module)
darts/models/forecasting/torch_forecasting_model.py:421
↓ 14 callersMethod_extract_torch_model_params
extract params from model creation to set up TorchForecastingModels
darts/models/forecasting/torch_forecasting_model.py:411
↓ 14 callersMethodencode_train
Returns encoded index for all past and/or future covariates for training. Which covariates are generated depends on the parameters used at mod
darts/dataprocessing/encoders/encoders.py:1034
↓ 14 callersMethodgenerate_train_idx
Generates/extracts time index (or integer index) for covariates at model training time. Parameters ---------- target
darts/dataprocessing/encoders/encoder_base.py:113
↓ 14 callersMethodhelper_test_nan
(self, metric, **kwargs)
darts/tests/metrics/test_metrics.py:1939
↓ 14 callersFunctionverify_shape
(dataset, rows, cols)
darts/tests/utils/test_model_selection.py:11
↓ 14 callersMethodwith_metadata
Return a new series with added metadata. Parameters ---------- metadata A dictionary with metadata to be added to
darts/timeseries.py:3447
↓ 13 callersMethod_build_forecast_series
Builds a forecast time series starting after the end of the training time series, with the correct time index (or after the end of th
darts/models/forecasting/forecasting_model.py:581
↓ 13 callersFunction_check_strict_positive
(param, param_name="")
darts/utils/likelihood_models/torch.py:88
↓ 13 callersMethodassert_series_equal
Helper to compare series differenced by `Diff`. Parameters ---------- series1 First `TimeSeries`
darts/tests/dataprocessing/transformers/test_diff.py:24
↓ 13 callersMethoddrop_before
Return a new series where everything before (and in-/excluding) the provided time `split_point` was dropped. The timestamp may not be in the
darts/timeseries.py:2560
↓ 13 callersMethodencode_inference
Each subclass must implement a method to encode the covariates index for prediction. Parameters ---------- n The
darts/dataprocessing/encoders/encoder_base.py:504
↓ 13 callersMethodfit
Fit/train the model on one or multiple series. Parameters ---------- series TimeSeries or Sequence[TimeS
darts/models/forecasting/sklearn_model.py:925
↓ 13 callersMethodfit_from_prediction
Fits the scorer on the two (sequences of) series. The function `diff_fn` passed as a parameter to the scorer, will transform `pred_series` an
darts/ad/scorers/scorers.py:428
↓ 13 callersMethodforce_plot
Display a SHAP "Force Plot" for one target and one horizon. It shows SHAP values of all input features with an additive force layout
darts/explainability/shap_explainer.py:678
↓ 13 callersFunctionpartialclass
(cls, *args, **kwargs)
darts/tests/models/forecasting/test_sklearn_models.py:163
↓ 13 callersMethodpd_to_backend
(self, df, backend, index=False)
darts/tests/test_timeseries.py:3034
↓ 12 callersMethod__init__
Parameters ---------- attribute The attribute of the underlying pd.DatetimeIndex from for which to apply cyclic
darts/dataprocessing/encoders/encoders.py:271
↓ 12 callersMethodconstruct_X_block
Helper function that creates the lagged features 'block' of a specific `series` (i.e. either `target_series`, `past_covariates`, or `
darts/tests/utils/tabularization/test_create_lagged_training_data.py:258
↓ 12 callersFunctionextract_trend_and_seasonality
Extracts trend and seasonality from a TimeSeries instance using `statsmodels.tsa`. Parameters ---------- ts The series to de
darts/utils/statistics.py:140
↓ 12 callersMethodhelper_test_transfer_np
static cov and metadata are not transferred when performing value comparisons. Output is a `np.ndarray`
darts/tests/test_timeseries_static_covariates.py:1271
↓ 12 callersMethodstack_samples
Creates an array of shape `(n_timesteps * n_samples, n_components)` from either a `TimeSeries` or the `array_values` of a `TimeSeries
darts/dataprocessing/transformers/base_data_transformer.py:633
↓ 11 callersMethod__init__
( self, d_model: int, d_kv: int, num_heads: int, dropout_rate: float,
darts/models/components/chronos2_submodels.py:249
↓ 11 callersFunction_parallel_apply
Utility function that parallelise the execution of a function over an Iterator Parameters ---------- iterator (Iterator[Tuple])
darts/utils/utils.py:207
↓ 11 callersMethodget_local_models
(self)
darts/tests/models/forecasting/test_regression_ensemble_model.py:92
↓ 11 callersMethodhelper_test_multiple_ts_duplication_equality
(self, metric, **kwargs)
darts/tests/metrics/test_metrics.py:1909
↓ 11 callersMethodhelper_test_multivariate_duplication_equality
(self, metric, **kwargs)
darts/tests/metrics/test_metrics.py:1883
↓ 11 callersMethodload_from_checkpoint
( model_name: str, work_dir: str | None = None, file_name: str | None = None,
darts/models/forecasting/global_baseline_models.py:188
↓ 11 callersMethodslice_intersect_values
Return the sliced values of the series where the time index was intersected with the `other` series. This method is in general *not* symmetri
darts/timeseries.py:2756
↓ 11 callersMethodstrip
Return a slice of the deterministic time series where NaN-containing entries at the beginning and the end were removed. No entries af
darts/timeseries.py:2823
↓ 10 callersMethod__init__
( self, input_size: int, skip_size: int | None = None, trainable_add: bool = T
darts/models/forecasting/tft_submodels.py:250
↓ 10 callersFunction_check_approximate_seasonality
Checks whether the given series has a given seasonality. Analyzes the given TimeSeries instance for seasonality of the given period while tak
darts/models/forecasting/fft.py:20
↓ 10 callersFunction_get_likelihood
Get the `Likelihood` object for `SKLearnModel`. Parameters ---------- likelihood The likelihood name. Must be one of `available_l
darts/utils/likelihood_models/sklearn.py:675
↓ 10 callersMethodapply_component_mask
Extracts components specified by `component_mask` from `series` Parameters ---------- series input TimeS
darts/dataprocessing/transformers/base_data_transformer.py:502
↓ 10 callersMethodcreate_model
(ocl, use_ll=True, model_type="regression", n_epochs=1, **kwargs)
darts/tests/utils/historical_forecasts/test_historical_forecasts.py:456
↓ 10 callersMethodexplain_single
Explains the last forecast of a foreground series (or background, if foreground is not provided) and returns a :class:`ShapSingleExpl
darts/explainability/shap_explainer.py:421
↓ 10 callersFunctionfill_missing_values
Fills missing values in the provided time series Parameters ---------- series The time series for which to fill missing valu
darts/utils/missing_values.py:30
↓ 10 callersMethodfit
(self, some_params=None)
darts/tests/utils/test_utils_torch.py:24
↓ 10 callersFunctionformat_dict
Formats a dictionary as a string, showing at most `max_items` items. Keys longer than `pad` are truncated with '...'. Values longer than `max_
darts/utils/_formatting.py:36
↓ 10 callersMethodget_deterministic_global_model
( lags: int | list[int], random_state: int = 13 )
darts/tests/models/forecasting/test_regression_ensemble_model.py:1780
↓ 10 callersMethodget_probabilistic_global_model
( lags: int | list[int], output_chunk_length: int = 1, likelihood: str = "quantile",
darts/tests/models/forecasting/test_regression_ensemble_model.py:1765
↓ 10 callersMethodhas_same_time_as
Whether the series has the same time index as the `other` series. Parameters ---------- other the other series
darts/timeseries.py:3056
↓ 10 callersMethodhelper_encoder_from_model
extracts encoders from parameters at model creation
darts/tests/dataprocessing/encoders/test_encoders.py:306
↓ 10 callersMethodhelper_manual_scaling_prediction
( self, model, ts: dict[str, TimeSeries], hf_scaler: dict[str, Scaler],
darts/tests/utils/historical_forecasts/test_historical_forecasts.py:2888
↓ 10 callersMethodload_weights_from_checkpoint
( self, model_name: str | None = None, work_dir: str | None = None, file_name:
darts/models/forecasting/global_baseline_models.py:202
↓ 10 callersMethodpd_to_backend
(df, backend, index=False)
darts/tests/test_timeseries_static_covariates.py:81
↓ 10 callersMethodpredict
Forecasts values for `n` time steps after the end of the series. Parameters ---------- n : int Forecast horizon -
darts/models/forecasting/sklearn_model.py:1151
↓ 10 callersFunctionstrided_moving_window
Extracts moving window views of an `x` array along a specified `axis`, where each window is of length `window_len` and consecutive windows ar
darts/utils/data/tabularization/tabularization.py:1956
↓ 10 callersMethodunstack_samples
Reshapes the 2D array returned by `stack_samples` back into an array of shape `(n_timesteps, n_components, n_samples)`; this 'undoes'
darts/dataprocessing/transformers/base_data_transformer.py:670
↓ 9 callersMethod_extract_values
Extract values from another series or array and check for compatible shapes.
darts/timeseries.py:4962
↓ 9 callersFunction_is_xarray
Check if *obj* is an xarray type without importing xarray.
darts/timeseries.py:6316
↓ 9 callersMethodadd
Marks a grid cell as active. Parameters ---------- elem Tuple of grid cell index (column, row)
darts/dataprocessing/dtw/window.py:217
↓ 9 callersMethoddata_array
Return an ``xarray.DataArray`` representation of the series. Parameters ---------- copy Whether to return a copy
darts/timeseries.py:1734
↓ 9 callersMethodhelper_compare_hf
Helper method to compare all the entries between two historical forecasts
darts/tests/utils/historical_forecasts/test_historical_forecasts.py:2948
↓ 9 callersFunctionmae
Mean Absolute Error (MAE). For the true series :math:`y` and predicted series :math:`\\hat{y}` of length :math:`T`, it is computed per compon
darts/metrics/metrics.py:325
↓ 9 callersFunctionoption_context
Context manager to temporarily set options in the `with` statement context. Available Options: - display.[max_rows, max_cols] - plo
darts/config.py:487
↓ 9 callersMethodrescale_with_value
Return a new series, which is a multiple of this series such that the first value is `value_at_first_step`. Note: Numerical errors can appear
darts/timeseries.py:2911
↓ 9 callersFunctionreset_option
Reset one or more options to their default value. Available Options: - display.[max_rows, max_cols] - plotting.use_darts_style
darts/config.py:419
↓ 9 callersFunctionseq2series
If `ts` is a Sequence with only a single series, return the single series as TimeSeries. Parameters ---------- ts None, a single
darts/utils/ts_utils.py:142
← previousnext →101–200 of 3,734, ranked by callers