MCPcopy Create free account

hub / github.com/unit8co/darts / functions

Functions3,734 in github.com/unit8co/darts

↓ 3 callersMethod_encode
Adds integer index value (position) to the provided `index`. For attribute=='relative', the reference point/index is the prediction/forecast i
darts/dataprocessing/encoders/encoders.py:564
↓ 3 callersMethod_encode
Single Encoders must implement an _encode() method to encode the index. Parameters ---------- index The index gen
darts/dataprocessing/encoders/encoder_base.py:634
↓ 3 callersFunction_extract_targets
Extracts and returns the target components from an input batch Parameters ---------- batch The input batch tuple for the forward
darts/models/forecasting/global_baseline_models.py:37
↓ 3 callersMethod_get_axis
Convert different `axis` types to an integer axis.
darts/timeseries.py:5235
↓ 3 callersMethod_get_equality_attrs
(likelihood, ignore_attrs)
darts/utils/likelihood_models/base.py:107
↓ 3 callersFunction_get_error_scale
Computes the error scale based on a naive seasonal forecasts on `insample` values with seasonality `m`.
darts/metrics/utils.py:834
↓ 3 callersMethod_get_importance
Returns the encoder or decoder variable of the TFT model. Parameters ---------- weights The weights of the encode
darts/explainability/tft_explainer.py:505
↓ 3 callersFunction_get_matching_index
Given two overlapping series `ts_target` and `ts_covariate` and an index point `idx` of `ts_target`, returns the matching index point in `ts_
darts/utils/data/utils.py:45
↓ 3 callersMethod_get_mc_dropout_modules
(self)
darts/models/forecasting/pl_forecasting_module.py:728
↓ 3 callersMethod_get_r_and_p_from_mu_and_alpha
(mu, alpha)
darts/utils/likelihood_models/torch.py:388
↓ 3 callersFunction_get_tolerance_levels
Computes normalized tolerance levels.
darts/metrics/utils.py:1113
↓ 3 callersMethod_get_values_repr
Create a representation of the TimeSeries values. The returned dimensions respect the maximum allowed items to be displayed Paramete
darts/timeseries.py:5584
↓ 3 callersMethod_helper_onnx_inference
Darts model is only used to detect which covariates are supported by the weights.
darts/tests/optional_deps/test_onnx.py:183
↓ 3 callersMethod_launch_encoder
Launches the encode sequence for past covariates and future covariates for either training, inference/prediction or training and inference/pre
darts/dataprocessing/encoders/encoders.py:1203
↓ 3 callersMethod_load_from_checkpoint
Loads a checkpoint for the underlying :class:`PLForecastingModule` (PLM) model. The PLM object is not stored when saving a :class:`TorchForeca
darts/models/forecasting/torch_forecasting_model.py:2308
↓ 3 callersMethod_plot_cov_selection
Plots the variable importance of the TFT model. Parameters ---------- importance The encoder / decoder importance
darts/explainability/tft_explainer.py:583
↓ 3 callersMethod_predict_wrapper
( self, n: int, series: TimeSeries | None = None, past_covariates: TimeSeries
darts/models/forecasting/forecasting_model.py:443
↓ 3 callersMethod_raise_if_not_within
(self, ts: pd.Timestamp | int)
darts/timeseries.py:5305
↓ 3 callersFunction_reconcile_from_S_and_G
Returns the TimeSeries linearly reconciled from the projection matrix G and the summation matrix S.
darts/dataprocessing/transformers/reconciliation.py:71
↓ 3 callersFunction_repeat_along_output_chunk
Expands a tensor `x` of shape (batch size, n components) to a tensor of shape (batch size, `ocl`, n target components, 1 (n samples)), by repeatin
darts/models/forecasting/global_baseline_models.py:50
↓ 3 callersMethod_restore_from_frequency
Return `times` resampled with frequency `freq` and values with `np.nan` for the newly inserted dates. The frequency `freq` must represent a t
darts/timeseries.py:5156
↓ 3 callersFunction_safe_scaled_divide
Divides ``errors`` by ``scale``, handling zero-scale entries gracefully. When ``zero_division`` is ``"warn"`` (default), the behavior depends on
darts/metrics/utils.py:869
↓ 3 callersMethod_sample_params
Select the absolute number of samples randomly if an integer has been supplied. If a float has been supplied, select a fraction
darts/models/forecasting/forecasting_model.py:2623
↓ 3 callersMethod_slice_intersect_bounds
Find the start (absolute index) and end (index relative to the end) indices that represent the time intersection from `self` and `other`.
darts/timeseries.py:2811
↓ 3 callersMethod_stack_ts_seq
(self, predictions)
darts/models/forecasting/ensemble_model.py:333
↓ 3 callersMethod_to_multi_series
Load the ILINetDataset dataset as a list of univariate timeseries.
darts/datasets/datasets.py:735
↓ 3 callersMethod_validate_model
Validates the model.
darts/explainability/shap_adapters/shap_adapter.py:431
↓ 3 callersMethodcomponent_wise_parameter
(self, scorer_to_test, **kwargs)
darts/tests/ad/test_scorers.py:791
↓ 3 callersFunctioncreate_lagged_data
r""" Creates the features array `X` and labels array `y` to train a lagged-variables `SKLearnModel` when `is_training = True`; alternatively,
darts/utils/data/tabularization/tabularization.py:34
↓ 3 callersFunctiondatetime_attribute_timeseries
Returns a new TimeSeries with index `time_index` and one or more dimensions containing (optionally one-hot encoded or cyclic encoded) pd.Data
darts/utils/timeseries_generation.py:546
↓ 3 callersFunctiondescribe_option
Describe one or more options. Available Options: - display.[max_rows, max_cols] - plotting.use_darts_style Parameters ----
darts/config.py:448
↓ 3 callersMethoddiff_fn_parameter
(self, scorer, **kwargs)
darts/tests/ad/test_scorers.py:778
↓ 3 callersFunctioneval_metric_from_binary_prediction
Computes a score/metric between predicted anomalies against true anomalies. `pred_anomalies` and `anomalies` must have: - identical dime
darts/ad/utils.py:90
↓ 3 callersFunctionextract_subseries
Partitions the series into a sequence of sub-series by using significant gaps of missing values Parameters ---------- series
darts/utils/missing_values.py:70
↓ 3 callersMethodfirst_values
First values of the potentially multivariate series. Returns ------- numpy.ndarray The first values of every comp
darts/timeseries.py:2037
↓ 3 callersMethodfit
Fit the model to data, separately for each output variable. Parameters ---------- X : {array-like, sparse matrix} of shape (n
darts/utils/multioutput.py:47
↓ 3 callersMethodfit
Fits the likelihood to the model. Parameters ---------- model The model to fit the likelihood to. The mo
darts/utils/likelihood_models/sklearn.py:479
↓ 3 callersMethodfit
(self, series: TimeSeries, verbose: bool | None = None)
darts/models/forecasting/fft.py:306
↓ 3 callersMethodfit
Fit/train the model on the provided series. Parameters ---------- series A target time series. The model will be
darts/models/forecasting/forecasting_model.py:173
↓ 3 callersMethodfit
(self, *args, **kwargs)
darts/models/forecasting/sf_model.py:32
↓ 3 callersMethodfit
(self, series: TimeSeries, verbose: bool | None = None)
darts/models/forecasting/baselines.py:157
↓ 3 callersMethodfrom_csv
Create a ``TimeSeries`` from a CSV file. One column can be used to represent the time (if not present, the time index will be a RangeIndex)
darts/timeseries.py:594
↓ 3 callersMethodgenerate_fit_predict_encodings
Generates covariate encodings for training and inference/prediction and returns a tuple of past, and future covariates series with the origina
darts/models/forecasting/forecasting_model.py:2467
↓ 3 callersMethodgenerate_predict_encodings
Generates covariate encodings for the inference/prediction set and returns a tuple of past, and future covariates series with the original and
darts/models/forecasting/forecasting_model.py:2423
↓ 3 callersMethodget_attention
Returns the time-dependent attention on the encoder and decoder for each `horizon` in (1, `output_chunk_length`). The time index rang
darts/explainability/explainability_result.py:620
↓ 3 callersMethodget_feature_times_past
Helper function that returns all the times within `past_covariates` that can be used to create features for training or prediction.
darts/tests/utils/tabularization/test_get_feature_times.py:68
↓ 3 callersFunctiongtz
(value)
darts/dataprocessing/dtw/window.py:121
↓ 3 callersMethodhelper_compare_encoded_covs_with_ref
checks that covariates generated by encoders fulfill the requirements compared to some reference covariates: What has to match:
darts/tests/models/forecasting/test_sklearn_models.py:3484
↓ 3 callersMethodhelper_compare_preds
(cp_pred, pred_expected, model_type, tol_rel=0.1)
darts/tests/models/forecasting/test_conformal_model.py:1172
↓ 3 callersMethodhelper_compute_pred_cal
Generates expected prediction results for naive conformal model from: - residuals and predictions from deterministic/probabilistic model
darts/tests/models/forecasting/test_conformal_model.py:1184
↓ 3 callersMethodhelper_create_torch_model
(self, model_cls, icl, ocl, shift, **kwargs)
darts/tests/models/forecasting/test_torch_forecasting_model.py:2903
↓ 3 callersMethodhelper_equality_encoders
( self, first_encoders: dict[str, Any], second_encoders: dict[str, Any] )
darts/tests/models/forecasting/test_torch_forecasting_model.py:2836
↓ 3 callersMethodhelper_equality_encoders_transfo
( self, first_encoders: dict[str, Any], second_encoders: dict[str, Any] )
darts/tests/models/forecasting/test_torch_forecasting_model.py:2847
↓ 3 callersMethodhelper_generate_input_series_from_lags
( self, list_lags, dict_lags, multiple_series, output_chunk_shift,
darts/tests/models/forecasting/test_sklearn_models.py:4048
↓ 3 callersMethodhelper_prepare_global_hfc_input
(self, model, n_fc: int, horizon: int = 1)
darts/tests/utils/historical_forecasts/test_historical_forecasts.py:4786
↓ 3 callersMethodhelper_test_loss
(self, exp_loss_val, exp_w_grad, loss_fn)
darts/tests/utils/test_losses.py:20
↓ 3 callersMethodhelper_test_min_train_series_requirements
( self, models, n_points, train_fcm, train_with_hfc, expected_
darts/tests/models/forecasting/test_regression_ensemble_model.py:786
↓ 3 callersMethodhelper_test_models_accuracy
( self, series, past_covariates, min_rmse_model, model, idx,
darts/tests/models/forecasting/test_sklearn_models.py:1191
↓ 3 callersMethodhelper_test_models_accuracy
( self, series, past_covariates, min_f1_model, model_params, i
darts/tests/models/forecasting/test_classifier_model.py:329
↓ 3 callersMethodhelper_test_shape_equality
(self, metric, **kwargs)
darts/tests/metrics/test_metrics.py:1856
↓ 3 callersFunctioninfer_freq_intersection
Infers the frequency at which two frequencies `freq` and `other` intersect. Parameters ---------- freq The first frequency. o
darts/utils/utils.py:482
↓ 3 callersMethodinverse_transform
(self, data, *args, **kwargs)
darts/tests/dataprocessing/test_pipeline.py:73
↓ 3 callersMethodload
Loads a model from a given file path. Example for loading a general save from :class:`RNNModel`: .. highlight:: python
darts/models/forecasting/torch_forecasting_model.py:2121
↓ 3 callersMethodload_config
Load the model configuration from a JSON file. Returns ------- dict The model configuration.
darts/models/components/huggingface_connector.py:79
↓ 3 callersMethodload_model
Load the model by creating an instance of the given module class and loading the weights. Some configuration files might contain external para
darts/models/components/huggingface_connector.py:107
↓ 3 callersMethodlongest_contiguous_slice
Return the largest slice of the deterministic series without any gaps (contiguous all-NaN value entries) larger than `max_gap_size`.
darts/timeseries.py:2859
↓ 3 callersFunctionplot_residuals_analysis
Plots data relevant to residuals. This function takes a univariate TimeSeries instance of residuals and plots their values, their distributio
darts/utils/statistics.py:1025
↓ 3 callersMethodpredict
Aggregates the (sequence of) multivariate binary series given as input into a (sequence of) univariate binary series. Parameters
darts/ad/aggregators/aggregators.py:69
↓ 3 callersMethodpredict
( self, n: int, num_samples: int = 1, verbose: bool | None = None, sho
darts/models/forecasting/theta.py:154
↓ 3 callersMethodpredict
( self, n: int, num_samples: int = 1, verbose: bool | None = None, sho
darts/models/forecasting/baselines.py:53
↓ 3 callersMethodscore
Compute the anomaly score(s) for the given (sequence of) series. Predicts the given target time series with the filtering model, and applies
darts/ad/anomaly_model/filtering_am.py:99
↓ 3 callersMethodset_option
Set the value of an option.
darts/config.py:302
↓ 3 callersFunctionsetup_tag
(tag, ts)
darts/tests/test_timeseries_static_covariates.py:67
↓ 3 callersMethodshow_anomalies_from_prediction
Plot the results of the scorer. Computes the anomaly score on the two series. And plots the results. The plot will be composed of th
darts/ad/scorers/scorers.py:170
↓ 3 callersMethodshow_anomalies_function
(self, visualization_function)
darts/tests/ad/test_anomaly_model.py:1387
↓ 3 callersMethodslice_intersect_times
Return the time index of the series where the time index was intersected with the `other` series. This method is in general *not* symmetric.
darts/timeseries.py:2783
↓ 2 callersMethod__init__
Parameters ---------- max_slope The slope of the steeper parallelogram side.
darts/dataprocessing/dtw/window.py:293
↓ 2 callersMethod__init__
MAE loss as defined in: https://en.wikipedia.org/wiki/Mean_absolute_error. Given a time series of actual values :math:`y_t` and a ti
darts/utils/losses.py:80
↓ 2 callersMethod__init__
Parameters ---------- window Integer value indicating the size of the window W used by the scorer to transform th
darts/ad/scorers/scorers.py:927
↓ 2 callersMethod__init__
Recurrent Neural Network Model (RNNs). This class provides three variants of RNNs: * Vanilla RNN * LSTM * GRU
darts/models/forecasting/rnn_model.py:291
↓ 2 callersMethod__init__
Temporal Convolutional Network Model (TCN). This is an implementation of a dilated TCN used for forecasting, inspired from [1]_. Thi
darts/models/forecasting/tcn_model.py:262
↓ 2 callersMethod__init__
Block Recurrent Neural Network Model (RNNs). This is a neural network model that uses an RNN encoder to encode fixed-length input chunks, and
darts/models/forecasting/block_rnn_model.py:262
↓ 2 callersMethod__init__
(self, *args, **kwargs)
darts/models/forecasting/forecasting_model.py:140
↓ 2 callersMethod__init__
An implementation of the TiDE model, as presented in [1]_. TiDE is similar to Transformers (implemented in :class:`TransformerModel`),
darts/models/forecasting/tide_model.py:367
↓ 2 callersMethod__init__
Transformer model Transformer is a state-of-the-art deep learning model introduced in 2017. It is an encoder-decoder architecture who
darts/models/forecasting/transformer_model.py:328
↓ 2 callersMethod__init__
PatchTST-FM Model for zero-shot forecasting. This is an implementation of IBM's PatchTST-FM model [1]_, ported from `ibm-granite/gran
darts/models/forecasting/patchtst_fm_model.py:354
↓ 2 callersMethod__init__
(self, likelihood: TorchLikelihood | None)
darts/models/forecasting/nf_model.py:125
↓ 2 callersMethod__init__
Base Conformal Prediction Model. Base class for any conformal prediction model. A conformal model calibrates the predictions from any
darts/models/forecasting/conformal_models.py:66
↓ 2 callersMethod__init__
( self, explanations: dict[str, Any] | list[dict[str, Any]], )
darts/explainability/explainability_result.py:609
↓ 2 callersMethod_add_capacities_to_df
(self, df: pd.DataFrame)
darts/models/forecasting/prophet_model.py:322
↓ 2 callersFunction_adjust_historical_forecasts_time_index
Shrink the beginning and end of the historical forecasts time index based on the value of `start`.
darts/utils/historical_forecasts/utils.py:1005
↓ 2 callersFunction_adjust_start
If relative start position `rel_start` is negative, then adjust it to the first non-negative index that lies a round-multiple of `stride` ahead of
darts/utils/historical_forecasts/utils.py:652
↓ 2 callersFunction_assert_fit_called
Checks that `fit_called` is `True`.
darts/ad/utils.py:755
↓ 2 callersMethod_batch_prediction_test_helper_function
(self, targets)
darts/tests/models/forecasting/test_global_forecasting_models.py:723
↓ 2 callersMethod_build_explainer_sklearn
( self, model_sklearn, background_arr: np.ndarray, shap_method: SHAPMethod,
darts/explainability/shap_adapters/sklearn_shap_adapter.py:116
↓ 2 callersMethod_build_train_dataset
( self, series: Sequence[TimeSeries], past_covariates: Sequence[TimeSeries] | None,
darts/models/forecasting/rnn_model.py:589
↓ 2 callersMethod_build_train_dataset
Models can override this method to return a custom `TorchTrainingDataset`.
darts/models/forecasting/torch_forecasting_model.py:596
↓ 2 callersMethod_calibrate_forecasts
Generate calibrated historical forecasts. In general the workflow of the models to produce one calibrated forecast/prediction per step in the
darts/models/forecasting/conformal_models.py:1088
↓ 2 callersFunction_check
(param, predicate, param_name, condition_str)
darts/utils/likelihood_models/torch.py:73
↓ 2 callersMethod_check_fit_called
Checks if the scorer has been fitted before calling its `score()` function.
darts/ad/scorers/scorers.py:741
← previousnext →401–500 of 3,734, ranked by callers