MCPcopy Create free account

hub / github.com/unit8co/darts / functions

Functions3,734 in github.com/unit8co/darts

↓ 9 callersFunctionshow_anomalies_from_scores
Plot the results generated by an anomaly model. The plot will be composed of the following: - the actual series itself with the output of
darts/ad/utils.py:301
↓ 9 callersMethodunapply_component_mask
Adds back components previously removed by `component_mask` in `apply_component_mask` method. Parameters ----------
darts/dataprocessing/transformers/base_data_transformer.py:566
↓ 8 callersMethod_assert_reconciliation
(self, fitted_recon)
darts/tests/dataprocessing/transformers/test_reconciliation.py:61
↓ 8 callersMethod_get_path_dataset
(self)
darts/datasets/dataset_loaders.py:186
↓ 8 callersFunction_series_from_values
(values)
darts/tests/dataprocessing/dtw/test_dtw.py:11
↓ 8 callersMethodeval_metric
Compute the accuracy of the anomaly scores computed by the model. Predicts the `series` with the forecasting model, and applies the scorer(s)
darts/ad/anomaly_model/forecasting_am.py:329
↓ 8 callersMethodfit
(self, series: TimeSeries, verbose: bool | None = None)
darts/models/forecasting/baselines.py:108
↓ 8 callersMethodfrom_json
Create a ``TimeSeries`` from the JSON String representation of a ``TimeSeries``. The JSON String representation can be generated with :func:`
darts/timeseries.py:1438
↓ 8 callersMethodhelper_test_scaling
(self, series, scaler, test_values)
darts/tests/dataprocessing/transformers/test_static_covariates_transformer.py:420
↓ 8 callersFunctionholidays_timeseries
Creates a binary univariate TimeSeries with index `time_index` that equals 1 at every index that lies within (or equals) a selected country's
darts/utils/timeseries_generation.py:478
↓ 8 callersMethodpath
Gives the index paths from `series1` to `series2`. Returns ------- np.ndarray of shape `(len(path), 2)` An array
darts/dataprocessing/dtw/dtw.py:178
↓ 8 callersMethodpredict_from_dataset
This method allows for predicting with a specific :class:`darts.utils.data.TorchInferenceDataset` instance. These datasets implement
darts/models/forecasting/torch_forecasting_model.py:1827
↓ 8 callersMethodsummary_plot
Display a SHAP "Summary Plot" for each horizon and each component dimension of the target. On each summary plot, SHAP values of each
darts/explainability/shap_explainer.py:579
↓ 8 callersMethodtail
Return a new series with the last `size` points. Parameters ---------- size : int, default: 5 number of points to
darts/timeseries.py:2202
↓ 7 callersFunction__getattr__
(name: str)
darts/utils/_lazy.py:52
↓ 7 callersMethod_assert_deterministic
(self)
darts/timeseries.py:5286
↓ 7 callersMethod_assert_deterministic
(series: TimeSeries)
darts/dataprocessing/transformers/reconciliation.py:223
↓ 7 callersMethod_fit_wrapper
( self, series: TimeSeriesLike, past_covariates: TimeSeriesLike | None = None,
darts/models/forecasting/forecasting_model.py:412
↓ 7 callersMethod_validate_predict_sample
Validates that the predict sample matches a sample that the model was trained on. For models relying on `TorchTrainingDataset` and `TorchInfe
darts/models/forecasting/torch_forecasting_model.py:660
↓ 7 callersMethodadd_datetime_attribute
Return a new series with one (or more) additional component(s) that contain an attribute of the series' time index. The additional co
darts/timeseries.py:3557
↓ 7 callersFunctionexpand_arr
Expands a np.ndarray to `ndim` dimensions (if not already satisfied).
darts/utils/utils.py:622
↓ 7 callersMethodfill
(self, value: float)
darts/dataprocessing/dtw/cost_matrix.py:29
↓ 7 callersMethodfit
Fit the underlying forecasting model (if applicable) and the fittable scorers, if any. Train the forecasting model (if not already fitted and
darts/ad/anomaly_model/forecasting_am.py:69
↓ 7 callersMethodfit
Initializes the Kalman filter using the N4SID algorithm. Parameters ---------- series The series of outp
darts/models/filtering/kalman_filter.py:74
↓ 7 callersMethodgenerate_train_inference_idx
Generates/extracts time index (or integer index) for covariates for training and inference / prediction. Parameters --------
darts/dataprocessing/encoders/encoder_base.py:153
↓ 7 callersFunctiongranger_causality_tests
Provides four tests for granger non causality of 2 time series using :func:`statsmodels.tsa.stattools.grangercausalitytests`. See [1]_.
darts/utils/statistics.py:547
↓ 7 callersMethodhead
Return a new series with the first `size` points. Parameters ---------- size : int, default 5 number of points
darts/timeseries.py:2171
↓ 7 callersFunctionhelper_generate_values
(shape: tuple[int, int, int])
darts/tests/test_timeseries_repr_formatting.py:15
↓ 7 callersMethodhelper_test_non_aggregate
(self, metric, is_aggregate, val_exp=None)
darts/tests/metrics/test_metrics.py:1962
↓ 7 callersMethodmedian
Return a new series with the median computed over the specified `axis`. If we reduce over time (``axis=0``), the series will have length one
darts/timeseries.py:4697
↓ 7 callersMethodpredict
( self, n: int, num_samples: int = 1, verbose: bool | None = None, sho
darts/models/forecasting/exponential_smoothing.py:158
↓ 7 callersMethodrandom_component_values
Return a 2-D array of shape (time, component), containing the series' values for one sample taken uniformly at random from all samples.
darts/timeseries.py:2088
↓ 7 callersMethodto_csv
Write the deterministic series to a CSV file. For a list of parameters, refer to the documentation of :func:`pandas.DataFrame.to_csv()` [1]_.
darts/timeseries.py:4389
↓ 7 callersMethodto_json
Return a JSON string representation of the deterministic series. At the moment this function works only on deterministic time series (i.e., m
darts/timeseries.py:4358
↓ 7 callersMethodtransform
(self, data, *args, **kwargs)
darts/tests/dataprocessing/test_pipeline.py:34
↓ 6 callersMethod__init__
( self, in_dim: int, out_dim: int, hidden_dim: int = 256, num_hidden_l
darts/models/components/patchtst_fm_submodels.py:130
↓ 6 callersMethod__init__
(self, d_model: int, d_ff: int, dropout: float = 0.1)
darts/models/components/glu_variants.py:17
↓ 6 callersFunction_get_runs_folder
(work_dir, model_name)
darts/models/forecasting/torch_forecasting_model.py:111
↓ 6 callersMethod_query_explainability_result
Helper that extracts and returns the explainability result attribute for a specified horizon and component from the input attribute.
darts/explainability/explainability_result.py:284
↓ 6 callersMethod_verify_static_covariates
Verify that all static covariates are numeric.
darts/models/forecasting/forecasting_model.py:2824
↓ 6 callersFunctioncheck_intersect
(other, start_, end_, freq_)
darts/tests/test_timeseries.py:2353
↓ 6 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_prediction_data.py:231
↓ 6 callersMethodcreate_shap_input
Creates the SHAP input for the given series and covariates, by following the logic of the model's prediction / inference dataset and
darts/explainability/shap_adapters/shap_adapter.py:389
↓ 6 callersMethoddistance
Gives the total distance between pair-wise elements in the two series after warping. Returns ------- float The to
darts/dataprocessing/dtw/dtw.py:194
↓ 6 callersMethodeval_metric
Compute a metric for the anomaly scores computed by the model. Predicts the `series` with the filtering model, and applies the scorer(s) on t
darts/ad/anomaly_model/filtering_am.py:152
↓ 6 callersMethodfit
Fits/trains the model using the provided list of features time series and the target time series. Parameters ----------
darts/models/forecasting/xgboost.py:267
↓ 6 callersMethodfit
(self, series: TimeSeries, verbose: bool | None = False)
darts/models/forecasting/theta.py:101
↓ 6 callersFunctionformat_bytes
Formats bytes as human-readable text. Parameters ---------- nbytes The number of bytes to format. precision The numbe
darts/utils/_formatting.py:1
↓ 6 callersMethodfrom_xarray
Create a ``TimeSeries`` from an `xarray.DataArray`. The dimensions of the DataArray have to be (time, component, sample), in this order. The
darts/timeseries.py:505
↓ 6 callersFunctiongenerate_random_series_with_probabilities
Generate categorical series with specific probabilities for each class
darts/tests/models/forecasting/test_classifier_model.py:780
↓ 6 callersFunctionget_dummy_series
( ts_length: int, lt_end_value: int = 10, st_value_offset: int = 10 )
darts/tests/models/forecasting/test_backtesting.py:45
↓ 6 callersMethodhelper_prepare_series
(self, is_univar, is_single)
darts/tests/models/forecasting/test_conformal_model.py:1163
↓ 6 callersMethodinitialize_encoders
instantiates the SequentialEncoder object based on self._model_encoder_settings and parameter ``add_encoders`` used at model creation
darts/models/forecasting/forecasting_model.py:2360
↓ 6 callersFunctionmake_collapsible_section
Creates a collapsible HTML section. Parameters ---------- title The title of the section. content The content of the
darts/utils/_formatting.py:135
↓ 6 callersMethodpredict
Generates sampled or direct likelihood parameter predictions. Parameters ---------- model The Darts `SKL
darts/utils/likelihood_models/sklearn.py:50
↓ 6 callersMethodpredict
( self, n: int, num_samples: int = 1, verbose: bool | None = None, sho
darts/models/forecasting/fft.py:370
↓ 6 callersFunctionquantile_interval_names
Generates formatted quantile interval names, optionally added to a component name. Parameters ---------- q_interval A tuple or mu
darts/utils/likelihood_models/base.py:170
↓ 6 callersMethodscore
Compute anomaly score(s) for the given series. Predicts the given target time series with the forecasting model, and applies the scorer(s)
darts/ad/anomaly_model/forecasting_am.py:156
↓ 6 callersMethodto_dtype
Cast module precision (float32 by default) to another precision.
darts/models/forecasting/pl_forecasting_module.py:779
↓ 6 callersFunctiontruncate_key
Truncates a key string to `max_len`, adding '...' if truncated. Parameters ---------- key The key to truncate. max_len
darts/utils/_formatting.py:20
↓ 5 callersMethod__init__
Base class for sklearn wrapper (e.g. `SKLearnModel`) likelihoods. Parameters ---------- likelihood_type A pre-def
darts/utils/likelihood_models/sklearn.py:24
↓ 5 callersMethod__init__
( self, num_features: int, *, epsilon: float = 1e-6, )
darts/models/components/timesfm2p5_submodels.py:94
↓ 5 callersMethod__init__
PyTorch module implementing the basic building block of the N-BEATS architecture. The blocks produce outputs of size (target_length, nr_param
darts/models/forecasting/nbeats.py:92
↓ 5 callersMethod__init__
Applies a transformation over the time dimension of a sequence based on the `PyTorch implementation of TSMixer <https://github.com/ditschuk/py
darts/models/forecasting/tsmixer_model.py:163
↓ 5 callersMethod__init__
Global Naive Drift Model. The model generates forecasts for each `series` as described below: - take the slope `m` from each target
darts/models/forecasting/global_baseline_models.py:562
↓ 5 callersMethod_assert_reconciliation_complex
(self, fitted_recon)
darts/tests/dataprocessing/transformers/test_reconciliation.py:68
↓ 5 callersMethod_assert_stochastic
(self)
darts/timeseries.py:5295
↓ 5 callersMethod_default_save_path
(cls)
darts/models/forecasting/forecasting_model.py:2659
↓ 5 callersMethod_diff_series
Applies the `diff_fn` to two sequences of time series. Converts two time series into 1. Each series-pair in series and pred_series must:
darts/ad/scorers/scorers.py:667
↓ 5 callersMethod_drop_encoded_components
Avoid pitfalls: `encode_train()` or `encode_inference()` can be called multiple times or chained. Exclude any encoded components from `covaria
darts/dataprocessing/encoders/encoder_base.py:568
↓ 5 callersMethod_extract_deterministic_values
Extract deterministic values from `series` (quantile=0.5 if `series` is probabilistic).
darts/ad/scorers/scorers.py:330
↓ 5 callersMethod_freq_to_days
Converts a frequency to number of days required by Facebook Prophet Parameters ---------- freq frequency string o
darts/models/forecasting/prophet_model.py:623
↓ 5 callersMethod_fun_window_agg
Transforms a window-wise anomaly score into a point-wise anomaly score. When using a window of size `W`, a scorer will return an ano
darts/ad/scorers/scorers.py:705
↓ 5 callersMethod_generate_component_mask
Returns the existing `component_mask` or generates a new component mask based on `columns`.
darts/dataprocessing/transformers/base_data_transformer.py:474
↓ 5 callersMethod_get_agg_dims
Get output time index and components based on a aggregation `axis` and potential new column name `new_cname`.
darts/timeseries.py:5254
↓ 5 callersFunction_get_calibration_hfc_start
Find the calibration start point (CSP) (for historical forecasts on calibration set). - If `start=None`, the CSP is also `None` (all possible hfc
darts/models/forecasting/conformal_models.py:1886
↓ 5 callersFunction_get_reduction
Returns the reduction function either from user kwargs or metric default. Optionally performs sanity checks for presence of `axis` parameter, and
darts/metrics/utils.py:786
↓ 5 callersMethod_process_foreground
( self, foreground_series: TimeSeriesLike | None = None, foreground_past_covariates: T
darts/explainability/explainability.py:151
↓ 5 callersMethod_process_horizons_and_targets
( self, horizons: int | Sequence[int] | None, target_components: str | Sequence[str] |
darts/explainability/explainability.py:173
↓ 5 callersMethod_process_series_idx
Convert the `series_idx` to a Sequence[int]. Note: the validity of the entries in series_idx is checked in _get_params().
darts/dataprocessing/transformers/base_data_transformer.py:466
↓ 5 callersMethod_repr_html_
(self)
darts/timeseries.py:5556
↓ 5 callersFunctioncheck_seasonality
Checks whether the TimeSeries `ts` is seasonal with period `m` or not. If `m` is None, we work under the assumption that there is a unique s
darts/utils/statistics.py:41
↓ 5 callersFunctioncompare_best_against_random
(model_class, params, series, stride=1)
darts/tests/models/forecasting/test_backtesting.py:55
↓ 5 callersMethodcompute_loss
Computes a loss from a `model_output`, which represents the parameters of a given probability distribution for every ground truth val
darts/utils/likelihood_models/torch.py:120
↓ 5 callersFunctioncreate_lagged_component_names
Helper function called to retrieve the name of the features and labels arrays created with `create_lagged_data()`. The order of the features
darts/utils/data/tabularization/tabularization.py:830
↓ 5 callersMethoddrop_columns
Return a new series with dropped components (columns). Parameters ---------- col_names String or list of strings
darts/timeseries.py:3497
↓ 5 callersMethodencode_train_inference
Returns encoded index for all past and/or future covariates for training and inference/prediction. Which covariates are generated depends on t
darts/dataprocessing/encoders/encoders.py:1147
↓ 5 callersMethodencode_train_inference
Each subclass must implement a method to encode the covariates index for training and prediction. Parameters ---------- n
darts/dataprocessing/encoders/encoder_base.py:529
↓ 5 callersMethodexpects_deterministic_input
(self, scorer, **kwargs)
darts/tests/ad/test_scorers.py:813
↓ 5 callersMethodexplain
Returns the :class:`TFTExplainabilityResult <darts.explainability.explainability_result.TFTExplainabilityResult>` result for all series in
darts/explainability/tft_explainer.py:119
↓ 5 callersMethodfit
Fits transformer to a (sequence of) `TimeSeries` by calling the user-implemented `ts_fit` method. The fitted parameters returned by `ts_fit`
darts/dataprocessing/transformers/fittable_data_transformer.py:220
↓ 5 callersMethodfit
(self, series, verbose: bool | None = False)
darts/models/forecasting/theta.py:310
↓ 5 callersMethodfit_from_dataset
Train the model with a specific :class:`darts.utils.data.TorchTrainingDataset` instance. These datasets implement a PyTorch ``Dataset
darts/models/forecasting/torch_forecasting_model.py:1201
↓ 5 callersMethodforecast
(self, *args, **kwargs)
darts/models/forecasting/sf_model.py:36
↓ 5 callersMethodforward
(self, x: torch.Tensor)
darts/models/forecasting/tsmixer_model.py:72
↓ 5 callersMethodget_global_models
( self, output_chunk_length=5, input_chunk_length=20, training_length=24 )
darts/tests/models/forecasting/test_regression_ensemble_model.py:96
↓ 5 callersMethodinputs_for_tests_categorical_covariates
Returns TimeSeries objects that can be used for testing impact of categorical covariates. Details: - series is a univariate
darts/tests/models/forecasting/test_sklearn_models.py:383
↓ 5 callersMethodinstantiate_model
(self, model_cls, kwargs)
darts/tests/models/forecasting/test_probabilistic_models.py:584
↓ 5 callersMethodinterpolate
(self, x)
darts/models/forecasting/tft_submodels.py:145
↓ 5 callersMethodlast_values
Last values of the potentially multivariate series. Returns ------- numpy.ndarray The last values of every compon
darts/timeseries.py:2048
← previousnext →201–300 of 3,734, ranked by callers