Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/unit8co/darts
/ functions
Functions
3,734 in github.com/unit8co/darts
⨍
Functions
3,734
◇
Types & classes
510
↳
Endpoints
59
↓ 5 callers
Function
make_paragraph
Creates an HTML paragraph with optional bold text and margin.
darts/utils/_formatting.py:161
↓ 5 callers
Method
predict
(self, *args, **kwargs)
darts/models/forecasting/sf_model.py:34
↓ 5 callers
Method
predict
( self, n: int, num_samples: int = 1, verbose: bool | None = None, sho
darts/models/forecasting/baselines.py:113
↓ 5 callers
Method
prepend
Return a new series with the `other` series prepended to this series along the time axis (added to the beginning). Parameters
darts/timeseries.py:3178
↓ 5 callers
Function
stationarity_tests
Double test on stationarity using both Kwiatkowski-Phillips-Schmidt-Shin and Augmented Dickey-Fuller statistical tests. WARNING Beca
darts/utils/statistics.py:414
↓ 5 callers
Function
to_group_dataframe
Converts a sequence of `TimeSeries` into a long DataFrame representation. It converts each series into individual DataFrames and then concatenate
darts/timeseries.py:6168
↓ 5 callers
Method
to_onnx
Export model to ONNX format for optimized inference, wrapping around PyTorch Lightning's :func:`torch.onnx.export` method (`official documenta
darts/models/forecasting/torch_forecasting_model.py:861
↓ 5 callers
Method
var
Return a deterministic series with the variance of each component computed over the samples of the stochastic series. This works only
darts/timeseries.py:4872
↓ 5 callers
Method
with_times_and_values
Return a new series similar to this one but with new `times` and `values`. Parameters ---------- times A pandas D
darts/timeseries.py:3256
↓ 4 callers
Method
__init__
(self, global_fit: bool, coef: int)
darts/tests/dataprocessing/test_pipeline.py:112
↓ 4 callers
Method
__init__
Regression Model Can be used to fit any scikit-learn-like regressor class to predict the target time series from lagged values. Param
darts/models/forecasting/sklearn_model.py:109
↓ 4 callers
Method
__repr__
(self)
darts/dataprocessing/pipeline.py:337
↓ 4 callers
Method
__str__
(self)
darts/utils/ts_utils.py:54
↓ 4 callers
Function
_apply_data_transformers
Transform each series using the corresponding Pipeline. If the Pipeline is fittable and `fit_transformers=True`, the series are sliced to corresp
darts/utils/historical_forecasts/utils.py:1370
↓ 4 callers
Function
_apply_inverse_data_transformers
If a preprocessing pipeline is registered under ``"series"`` and can be reversed, convert ``forecasts`` from preprocessed form back to the or
darts/utils/historical_forecasts/utils.py:1435
↓ 4 callers
Function
_assert_same_length
Checks if the two sequences contain the same number of TimeSeries.
darts/ad/utils.py:621
↓ 4 callers
Function
_assert_timeseries
Checks if given input is of type Darts TimeSeries
darts/ad/utils.py:525
↓ 4 callers
Method
_assert_univariate
(self)
darts/timeseries.py:5277
↓ 4 callers
Function
_build_forecast_series
Builds a forecast time series starting after the end of an input time series, with the correct time index (or after the end of the input seri
darts/utils/timeseries_generation.py:757
↓ 4 callers
Function
_build_forecast_series_from_schema
Builds a forecast time series from predicted values and `TimeSeries` schema starting at `pred_start`. Parameters ---------- values
darts/utils/timeseries_generation.py:823
↓ 4 callers
Method
_check_ds_stride
Every `stride`-th values in a dataset with stride=1 should be identical to the dataset stridden with `stride
darts/tests/utils/torch_datasets/test_torch_datasets.py:68
↓ 4 callers
Function
_check_quantiles
(quantiles)
darts/utils/utils.py:257
↓ 4 callers
Method
_create_lagged_data
( self, series: Sequence[TimeSeries], past_covariates: Sequence[TimeSeries], f
darts/models/forecasting/sklearn_model.py:757
↓ 4 callers
Method
_expand_threshold
(series: TimeSeries, threshold: list[float])
darts/ad/detectors/detectors.py:275
↓ 4 callers
Method
_find_option
Find options matching a pattern (supports both exact match and prefix match).
darts/config.py:262
↓ 4 callers
Function
_find_relevant_timestamp_attributes
Finds pd.Timestamp attributes relevant for seasonality. Analyzes the given TimeSeries instance for relevant pd.Timestamp attributes in terms
darts/models/forecasting/fft.py:82
↓ 4 callers
Function
_generate_coder
Generates an Encoder or Decoder with one of Darts' Feed-forward Network variants. Parameters ---------- coder_cls Either `torch.nn
darts/models/forecasting/transformer_model.py:33
↓ 4 callers
Function
_get_checkpoint_folder
(work_dir, model_name)
darts/models/forecasting/torch_forecasting_model.py:103
↓ 4 callers
Function
_get_quantile_intervals
Returns the lower and upper bound values from `vals` for all quantile intervals in `q_interval`. Parameters ---------- vals A num
darts/metrics/utils.py:669
↓ 4 callers
Function
_get_summation_matrix
Returns the matrix S for a series, as defined `here <https://otexts.com/fpp3/reconciliation.html>`__. The dimension of the matrix is `(n, m)
darts/dataprocessing/transformers/reconciliation.py:27
↓ 4 callers
Method
_merge_covariates
If (actual) covariates are given, merge the encoded index with the covariates Parameters ---------- encoded The e
darts/dataprocessing/encoders/encoder_base.py:553
↓ 4 callers
Method
_optimized_historical_forecasts
For SKLearnModels we create the lagged prediction data once per series using a moving window. With this, we can avoid having to recre
darts/models/forecasting/sklearn_model.py:1551
↓ 4 callers
Function
_plot_series
Internal function called by `show_anomalies_from_scores()` Plot the series on the given axes ax_id. Parameters ---------- series
darts/ad/utils.py:640
↓ 4 callers
Method
_sort_index
Sort `times` and `values` by ascending dates. Only performed if `times` is not already monotonically increasing.
darts/timeseries.py:5078
↓ 4 callers
Method
_tabularize_series
Internal function called by WindowedAnomalyScorer `fit()` and `score()` functions. Transforms a sequence of series into tabular data of size
darts/ad/scorers/scorers.py:854
↓ 4 callers
Function
_time_to_feature
Converts a time series Tensor to a feature Tensor.
darts/models/forecasting/tsmixer_model.py:62
↓ 4 callers
Method
add_holidays
Return a new series with an added holiday component. The holiday component is binary where `1` corresponds to a time step falling on a holida
darts/timeseries.py:3611
↓ 4 callers
Method
add_seasonality
Adds a custom seasonality to the model that repeats after every n `seasonal_periods` timesteps. An example for `seasonal_periods`: If you have
darts/models/forecasting/prophet_model.py:479
↓ 4 callers
Method
filter
Fits the Gaussian Process on the observations and returns samples from the Gaussian Process, or its mean values if `num_samples` is s
darts/models/filtering/gaussian_process_filter.py:35
↓ 4 callers
Method
fit
Fit all fittable transformers in pipeline. Parameters ---------- data (`Sequence` of) `TimeSeries` to fi
darts/dataprocessing/pipeline.py:108
↓ 4 callers
Method
fit
Fit the underlying filtering model (if applicable) and the fittable scorers, if any. Train the filter (if not already fitted and `allow_model
darts/ad/anomaly_model/filtering_am.py:64
↓ 4 callers
Method
fit
(self, series: TimeSeries, verbose: bool | None = None)
darts/models/forecasting/baselines.py:47
↓ 4 callers
Function
format_list
Formats a list as a string, showing at most `max_items` items. Pass `render_html=True` to escape '<' and '>' characters. Parameters -----
darts/utils/_formatting.py:104
↓ 4 callers
Method
forward
(self, x_in, h=None)
darts/tests/models/forecasting/test_RNN.py:32
↓ 4 callers
Method
generate_fit_encodings
Generates the covariate encodings that were used/generated for fitting the model and returns a tuple of past, and future covariates series wit
darts/models/forecasting/forecasting_model.py:2385
↓ 4 callers
Method
generate_train_idx
( self, target: TimeSeries, covariates: TimeSeries | None = None )
darts/dataprocessing/encoders/encoder_base.py:373
↓ 4 callers
Method
get_decoder_importance
Returns the time-dependent decoder importances as a pd.DataFrames. If multiple series were used in :func:`TFTExplainer.explain()
darts/explainability/explainability_result.py:649
↓ 4 callers
Method
get_encoder_importance
Returns the time-dependent encoder importances as a pd.DataFrames. If multiple series were used in :func:`TFTExplainer.explain()
darts/explainability/explainability_result.py:641
↓ 4 callers
Function
get_multioutput_estimator_cls
(model_type: ModelType)
darts/utils/multioutput.py:169
↓ 4 callers
Method
get_static_covariates_importance
Returns the numeric and categorical static covariates importances as a pd.DataFrames. If multiple series were used in :func:`TFTExpla
darts/explainability/explainability_result.py:657
↓ 4 callers
Method
get_test_cases
(self, **kwargs)
darts/tests/metrics/test_metrics.py:1866
↓ 4 callers
Method
helper_create_LinearModel
(self, multi_models=True, extreme_lags=False)
darts/tests/models/forecasting/test_sklearn_models.py:4029
↓ 4 callers
Method
helper_create_model
( self, use_encoders=True, add_relative_idx=True, full_attention=False )
darts/tests/explainability/test_tft_explainer.py:457
↓ 4 callers
Method
helper_eval_metric_single_series
Evaluate model on given series, for all 4 supported metric functions
darts/tests/ad/test_aggregators.py:131
↓ 4 callers
Function
helper_generate_ts_hierarchy
(length: int)
darts/tests/dataprocessing/transformers/test_window_transformations.py:12
↓ 4 callers
Method
helper_get_input
(self, series_option: str)
darts/tests/explainability/test_tft_explainer.py:58
↓ 4 callers
Method
helper_relevant_attributes
(self, freq, length, period_attributes_tuples)
darts/tests/models/forecasting/test_fft.py:8
↓ 4 callers
Method
helper_sequence_encode_inference
test comparisons for `SequentialEncoder.encode_inference()
darts/tests/dataprocessing/encoders/test_encoders.py:282
↓ 4 callers
Method
helper_test_cyclic_encoder
Test cases for both `PastCyclicEncoder` and `FutureCyclicEncoder`
darts/tests/dataprocessing/encoders/test_encoders.py:1300
↓ 4 callers
Function
helper_test_drop_after
(test_series: TimeSeries, keep_point: bool)
darts/tests/test_timeseries.py:2275
↓ 4 callers
Function
helper_test_drop_before
(test_series: TimeSeries, keep_point: bool)
darts/tests/test_timeseries.py:2302
↓ 4 callers
Method
helper_test_encoder_single_inference
Test `SingleEncoder.encode_inference()`
darts/tests/dataprocessing/encoders/test_encoders.py:1444
↓ 4 callers
Method
helper_test_index_generator_inference
For prediction (`n` is given) with past covariates we have to distinguish between two cases: 1) if past covariates are given, we can
darts/tests/dataprocessing/encoders/test_covariate_index_generators.py:148
↓ 4 callers
Method
helper_test_index_generator_train
If covariates are given, the index generators should return the covariate series' index. If covariates are not given, the index gener
darts/tests/dataprocessing/encoders/test_covariate_index_generators.py:105
↓ 4 callers
Method
helper_test_index_types
test the index type of generated index
darts/tests/dataprocessing/encoders/test_covariate_index_generators.py:75
↓ 4 callers
Method
helper_test_prediction_shape
checks whether prediction has same number of variable as input series and whether prediction has correct length
darts/tests/models/forecasting/test_TFT.py:311
↓ 4 callers
Method
helper_test_transfer_values
values of static cov or metadata must match but not row index (component names). I.e. series.quantile() adds "_quantiles" to component names
darts/tests/test_timeseries_static_covariates.py:1277
↓ 4 callers
Method
helper_window_parameter
(self, scorer_to_test, **kwargs)
darts/tests/ad/test_scorers.py:754
↓ 4 callers
Method
inverse
(self, x: torch.Tensor)
darts/models/components/layer_norm_variants.py:110
↓ 4 callers
Method
predict
(self, *args, **kwargs)
darts/tests/utils/historical_forecasts/test_historical_forecasts.py:4532
↓ 4 callers
Method
predict
Forecasts values for `n` time steps after the end of the training series. Parameters ---------- n Forecast horizo
darts/models/forecasting/forecasting_model.py:353
↓ 4 callers
Function
remove_from_series
Removes the TimeSeries `other` from the TimeSeries `ts` as specified by `model`. Use e.g. to remove an additive or multiplicative trend from
darts/utils/statistics.py:265
↓ 4 callers
Function
remove_seasonality
Adjusts the TimeSeries `ts` for a seasonality of order `frequency` using the `model` decomposition. Parameters ---------- ts
darts/utils/statistics.py:310
↓ 4 callers
Function
remove_trend
Adjusts the TimeSeries `ts` for a trend using the `model` decomposition. Parameters ---------- ts The TimeSeries to adjust.
darts/utils/statistics.py:365
↓ 4 callers
Function
sample_from_quantiles
Generates `num_samples` samples from quantile predictions using linear interpolation. The generated samples should have quantile values close to t
darts/utils/utils.py:630
↓ 4 callers
Method
set_mc_dropout
(self, active: bool)
darts/models/forecasting/pl_forecasting_module.py:738
↓ 4 callers
Method
shap_explanations
Computes SHAP explanations for the given foreground data, horizons, and target components. It returns a nested dictionary of SHAP Exp
darts/explainability/shap_adapters/shap_adapter.py:184
↓ 4 callers
Method
slice_n_points_after
Return a slice of the series starting at `start_ts` (inclusive) and having at most `n` points. Parameters ---------- start_ts
darts/timeseries.py:2663
↓ 4 callers
Method
slice_n_points_before
Return a slice of the series ending at `end_ts` (inclusive) and having at most `n` points. Parameters ---------- end_ts
darts/timeseries.py:2694
↓ 4 callers
Function
stationarity_test_adf
Provides Augmented Dickey-Fuller unit root test for a time series, using :func:`statsmodels.tsa.stattools.adfuller`. See [1]_. Paramete
darts/utils/statistics.py:495
↓ 4 callers
Function
stationarity_test_kpss
Provides Kwiatkowski-Phillips-Schmidt-Shin test for stationarity for a time series, using :func:`statsmodels.tsa.stattools.kpss`. See [1]_.
darts/utils/statistics.py:453
↓ 4 callers
Function
train_test_split
Splits all provided TimeSeries instances into train and test sets according to the provided timestamp. Parameters ---------- feature
darts/tests/models/forecasting/test_sklearn_models.py:53
↓ 3 callers
Method
__abs__
(self)
darts/timeseries.py:5470
↓ 3 callers
Function
__dir__
()
darts/utils/_lazy.py:84
↓ 3 callers
Method
__init__
Abstract class for all training datasets that can be used with Darts' `TorchForecastingModel`. Each sample drawn from this dataset m
darts/utils/data/torch_datasets/training_dataset.py:28
↓ 3 callers
Method
__init__
Reversible Instance Normalization based on [1]_ Parameters ---------- input_dim The dimension of the input axis b
darts/models/components/layer_norm_variants.py:63
↓ 3 callers
Method
__init__
PyTorch module implementing the basic building block of the N-HiTS architecture. The blocks produce outputs of size (target_length, nr_params
darts/models/forecasting/nhits.py:37
↓ 3 callers
Method
__init__
Naive Mean Model This model has no parameter, and always predicts the mean value of the training series. Examples --
darts/models/forecasting/baselines.py:18
↓ 3 callers
Method
__init__
(self, kernel_size, stride)
darts/models/forecasting/dlinear.py:23
↓ 3 callers
Method
__str__
returns the name of the aggregator
darts/ad/aggregators/aggregators.py:47
↓ 3 callers
Function
_assert_binary
Checks if series is a binary timeseries (1 and 0)" Parameters ---------- series series to check for. name name of the
darts/ad/utils.py:506
↓ 3 callers
Function
_build_exog_list
Utility function to create pseudo *_exog_list inputs expected by NeuralForecast
darts/models/forecasting/nf_model.py:110
↓ 3 callers
Method
_build_explainer
Builds the SHAP explainer based on the specified SHAP method. Parameters ---------- func The function wr
darts/explainability/shap_adapters/shap_adapter.py:365
↓ 3 callers
Method
_build_inference_dataset
Models can override this method to return a custom `TorchInferenceDataset`.
darts/models/forecasting/torch_forecasting_model.py:621
↓ 3 callers
Method
_check_dropout_activity
(pl_module, expected_active: bool)
darts/tests/models/forecasting/test_torch_forecasting_model.py:1974
↓ 3 callers
Function
_check_in_open_0_1_intvl
(param, param_name="")
darts/utils/likelihood_models/torch.py:92
↓ 3 callers
Function
_compute_score
Computes a score on the confusion matrix of two np.arrays `y_true` and `y_pred`. Parameters ---------- y_true The true labels.
darts/metrics/utils.py:1050
↓ 3 callers
Function
_convert_data_transformers
( data_transformers: dict[str, BaseDataTransformer | Pipeline] | None, copy: bool, )
darts/utils/historical_forecasts/utils.py:1355
↓ 3 callers
Method
_distr_from_params
Returns a torch distribution built with the specified params
darts/utils/likelihood_models/torch.py:178
↓ 3 callers
Function
_dtw_cost_matrix
( x: np.ndarray, y: np.ndarray, dist: DistanceFunc, window: Window )
darts/dataprocessing/dtw/dtw.py:24
← previous
next →
301–400 of 3,734, ranked by callers