Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/unit8co/darts
/ functions
Functions
3,734 in github.com/unit8co/darts
⨍
Functions
3,734
◇
Types & classes
510
↳
Endpoints
59
↓ 795 callers
Method
values
Return a 2-D array of shape (time, component), containing the series' values for one `sample`. Parameters ---------- copy
darts/timeseries.py:2059
↓ 628 callers
Method
predict
(self, *args, **kwargs)
darts/tests/models/forecasting/test_local_forecasting_models.py:658
↓ 582 callers
Function
raise_log
Can be used to replace "raise" when throwing an exception to ensure the logging of the exception. After logging it, the exception is raised.
darts/logging.py:108
↓ 467 callers
Method
fit
(self, *args, **kwargs)
darts/tests/models/forecasting/test_local_forecasting_models.py:654
↓ 344 callers
Method
end_time
End time of the series. Returns ------- pandas.Timestamp | int A timestamp containing the last time of the TimeSe
darts/timeseries.py:2002
↓ 321 callers
Method
all_values
Return a 3-D array of dimension (time, component, sample) containing the series' values for all samples. Parameters ----------
darts/timeseries.py:2109
↓ 309 callers
Method
append
Return a new series with the `other` series appended to this series along the time axis (added to the end). Parameters ----------
darts/timeseries.py:3078
↓ 309 callers
Function
linear_timeseries
Creates a univariate TimeSeries with a starting value of `start_value` that increases linearly such that it takes on the value `end_value` at
darts/utils/timeseries_generation.py:95
↓ 289 callers
Method
start_time
Start time of the series. Returns ------- pandas.Timestamp | int A timestamp containing the first time of the Tim
darts/timeseries.py:1991
↓ 281 callers
Method
from_times_and_values
Create a ``TimeSeries`` from a time index and value array. Parameters ---------- times A pandas DateTimeIndex, Ra
darts/timeseries.py:1236
↓ 256 callers
Method
stack
Return a new series with the `other` series stacked to this series along the component axis. The resulting TimeSeries will have the same name
darts/timeseries.py:3479
↓ 217 callers
Method
historical_forecasts
Generates calibrated historical forecasts by simulating predictions at various points in time throughout the history of the provided (potentia
darts/models/forecasting/conformal_models.py:396
↓ 212 callers
Method
from_values
Create an ``TimeSeries`` from an array of values. The series will have an integer time index (RangeIndex). Parameters ------
darts/timeseries.py:1347
↓ 175 callers
Method
with_static_covariates
Return a new series with added static covariates. Static covariates hold information / data about the time series which does not vary over ti
darts/timeseries.py:3346
↓ 163 callers
Method
concatenate
Return a new series where this series is concatenated with the `other` series along a given `axis`. Parameters ---------- oth
darts/timeseries.py:2232
↓ 156 callers
Function
constant_timeseries
Creates a constant univariate TimeSeries with the given value, length (or end date), start date and frequency. Parameters ----------
darts/utils/timeseries_generation.py:40
↓ 150 callers
Method
copy
Create a copy of the series. Returns ------- TimeSeries A copy of the series.
darts/timeseries.py:2356
↓ 133 callers
Function
get_logger
Internally calls the logging.getLogger function with the `name` argument to create or retrieve a logger object. It is recommended to pass __n
darts/logging.py:8
↓ 131 callers
Method
get
Get the current option value.
darts/config.py:100
↓ 129 callers
Method
fit
(self, a, b=0, c=0)
darts/tests/utils/test_utils.py:63
↓ 119 callers
Method
astype
Return a new series with the values have been converted to the desired `dtype`. Parameters ---------- dtype A Num
darts/timeseries.py:1971
↓ 116 callers
Function
generate_index
Returns an index with a given start point and length. Either a pandas DatetimeIndex with given frequency or a pandas RangeIndex. The index starts
darts/utils/utils.py:527
↓ 115 callers
Function
series2seq
If possible, converts `ts` into the desired sequence type `seq_type_out`. Otherwise, returns the original `ts`. Parameters ----------
darts/utils/ts_utils.py:58
↓ 102 callers
Method
inverse_transform
(self)
darts/tests/dataprocessing/transformers/test_static_covariates_transformer.py:139
↓ 98 callers
Method
mean
Return a new series with the mean computed over the specified `axis`. If we reduce over time (``axis=0``), the series will have length one an
darts/timeseries.py:4668
↓ 94 callers
Method
fit_transform
For each data transformer in the pipeline, first fit the data if transformer is fittable then transform data using fitted transformer
darts/dataprocessing/pipeline.py:134
↓ 90 callers
Function
raise_if_not
Checks provided boolean condition and raises a ValueError if it evaluates to False. It logs the error to the provided logger before raising i
darts/logging.py:53
↓ 86 callers
Method
backtest
r"""Compute error values that the model produced for historical forecasts on (potentially multiple) `series`. If `historical_forecasts` are p
darts/models/forecasting/conformal_models.py:629
↓ 83 callers
Method
from_dataframe
Create a ``TimeSeries`` from a selection of columns of a `DataFrame`. One column (or the DataFrame index) has to represent the time, and a li
darts/timeseries.py:699
↓ 83 callers
Method
sum
Return a new series with the sum computed over the specified `axis`. If we reduce over time (``axis=0``), the series will have length one and
darts/timeseries.py:4728
↓ 80 callers
Function
concatenate
Concatenates multiple series along a given axis. ``axis`` can be an integer in (0, 1, 2) to denote (time, component, sample) or, alternatively, a
darts/timeseries.py:5997
↓ 80 callers
Method
eval_metric
Score the results against true anomalies. Parameters ---------- anomalies The (sequence of) ground truth binary a
darts/ad/detectors/detectors.py:74
↓ 80 callers
Method
get_explanation
Returns one or multiple explanations based on some input parameters.
darts/explainability/explainability_result.py:40
↓ 77 callers
Method
from_series
Create a ``TimeSeries`` from a `Series`. The series must contain an index that is either a pandas DatetimeIndex, a pandas RangeIndex, or a pa
darts/timeseries.py:1155
↓ 75 callers
Method
update
(self, preds, target)
darts/tests/models/forecasting/test_torch_forecasting_model.py:144
↓ 74 callers
Function
raise_if
Checks provided boolean condition and raises a ValueError if it evaluates to True. It logs the error to the provided logger before raising it
darts/logging.py:82
↓ 71 callers
Method
transform
(self)
darts/tests/dataprocessing/transformers/test_static_covariates_transformer.py:129
↓ 70 callers
Method
to_dataframe
Return a DataFrame representation of the series in a given `backend`. Each of the series components will appear as a column in the DataFrame.
darts/timeseries.py:1796
↓ 68 callers
Method
score_from_prediction
Computes the anomaly score on the two (sequence of) series. If a pair of sequences is given, they must contain the same number of ser
darts/ad/scorers/scorers.py:67
↓ 66 callers
Method
to_series
Return a `Series` representation of the series in a given `backend`. Works only for univariate series that are deterministic (i.e., made of 1
darts/timeseries.py:1757
↓ 63 callers
Method
quantile
Return a deterministic series with the desired quantile(s) `q` of each component computed over the samples of the stochastic series.
darts/timeseries.py:4815
↓ 59 callers
Method
fit
( self, series: TimeSeriesLike, past_covariates: TimeSeriesLike | None = None,
darts/models/forecasting/linear_regression_model.py:208
↓ 59 callers
Method
helper_test_transfer
static cov or metadata must be identical
darts/tests/test_timeseries_static_covariates.py:1263
↓ 56 callers
Method
load
Load the dataset in memory, as a TimeSeries. Downloads the dataset if it is not present already Raises ------
darts/datasets/dataset_loaders.py:66
↓ 55 callers
Method
get_feature_values
Returns one or several ``TimeSeries`` representing the feature values for a given horizon and component. Parameters
darts/explainability/explainability_result.py:421
↓ 52 callers
Method
univariate_values
Return a 1-D Numpy array of shape (time,) containing the univariate series' values for one `sample`. Parameters ---------- co
darts/timeseries.py:2128
↓ 50 callers
Method
_assert_eq
(self, lefts: tuple, rights: tuple)
darts/tests/utils/torch_datasets/test_torch_datasets.py:45
↓ 49 callers
Method
get_shap_explanation_object
Returns the underlying ``shap.Explanation`` object for a given horizon and component. Parameters ---------- horizon
darts/explainability/explainability_result.py:440
↓ 48 callers
Method
window_transform
Return a new series with the specified window transformations applied. Supports moving/rolling, expanding or exponentially weighted window tr
darts/timeseries.py:3872
↓ 47 callers
Method
split_after
Split the series in two, after a provided `split_point`. Parameters ---------- split_point A timestamp, float or
darts/timeseries.py:2492
↓ 46 callers
Method
residuals
Compute the residuals that the model produced for historical forecasts on (potentially multiple) `series`. This function computes the differe
darts/models/forecasting/conformal_models.py:862
↓ 46 callers
Method
untrained_model
(self)
darts/models/forecasting/ensemble_model.py:252
↓ 43 callers
Method
fit
(self, X, y)
darts/tests/explainability/test_shap_explainer.py:60
↓ 43 callers
Method
fit
Fits the forecasting models with the entire series except the last `regression_train_n_points` values, which are used to train the re
darts/models/forecasting/regression_ensemble_model.py:372
↓ 40 callers
Method
append_values
Return a new series with `values` appended to this series along the time axis (added to the end). This adds time steps to the end of the new
darts/timeseries.py:3131
↓ 39 callers
Function
get_single_series
Returns a single (first) TimeSeries or `None` from `ts`. Returns `ts` if `ts` is a TimeSeries, `ts[0]` if `ts` is a `Sequence[TimeSeries]`, and `
darts/utils/ts_utils.py:160
↓ 38 callers
Function
_get_feature_times
Returns a tuple containing the times in `target_series`, the times in `past_covariates`, and the times in `future_covariates` that *could* be
darts/utils/data/tabularization/tabularization.py:1541
↓ 38 callers
Function
get_shared_times
Returns the times shared by all specified `TimeSeries` or time indexes (i.e. the intersection of all these times). If `sort = True`, then the
darts/utils/data/tabularization/tabularization.py:1795
↓ 38 callers
Method
predict
(self, X)
darts/tests/explainability/test_shap_explainer.py:65
↓ 38 callers
Method
split_before
Split the series in two, before a provided `split_point`. Parameters ---------- split_point A timestamp, float or
darts/timeseries.py:2512
↓ 37 callers
Method
fit
(self)
darts/tests/dataprocessing/transformers/test_static_covariates_transformer.py:126
↓ 35 callers
Method
save
Saves the ensemble model under a given path or file handle. Additionally, two files are stored for each `TorchForecastingModel` unde
darts/models/forecasting/ensemble_model.py:542
↓ 34 callers
Method
explain
Explains all possible foreground series forecasts (or background, if foreground is not provided) and returns a :class:`ShapExplainabi
darts/explainability/shap_explainer.py:215
↓ 34 callers
Function
get_option
Retrieves the value of the specified option. Available Options: - display.[max_rows, max_cols] - plotting.use_darts_style Para
darts/config.py:357
↓ 34 callers
Method
score
Computes the anomaly score on the given series. If a sequence of series is given, the scorer will score each series independently and
darts/ad/scorers/scorers.py:465
↓ 34 callers
Method
static_covariates_values
Return a 2-D array of dimension (component, static variable) containing the series' static covariate values. Parameters ----------
darts/timeseries.py:2150
↓ 32 callers
Method
detect
Detect anomalies on given time series. Parameters ---------- series The (sequence of) series on which to detect a
darts/ad/detectors/detectors.py:43
↓ 32 callers
Method
helper_check_lagged_data
Helper function to call the `create_lagged_training_data()` method with lags argument either in the list format or the dictionary format (auto
darts/tests/utils/tabularization/test_create_lagged_training_data.py:479
↓ 32 callers
Method
slice_intersect
Return a slice of the series where the time index was intersected with the `other` series. This method is in general *not* symmetric.
darts/timeseries.py:2725
↓ 31 callers
Method
fit
( self, series: TimeSeriesLike, past_covariates: TimeSeriesLike | None = None,
darts/models/forecasting/naive_ensemble_model.py:76
↓ 31 callers
Method
map
Return a new series with the function `fn` applied to the values of this series. If `fn` takes 1 argument it is simply applied on the values
darts/timeseries.py:3770
↓ 31 callers
Method
resample
Return a new series where the time index and values were resampled with a given frequency. The provided `method` is used to aggregate/fill ho
darts/timeseries.py:3657
↓ 30 callers
Method
fit
(self, *args, **kwargs)
darts/tests/utils/historical_forecasts/test_historical_forecasts.py:4528
↓ 30 callers
Method
fit
(*args)
darts/tests/models/forecasting/test_classifier_model.py:1151
↓ 30 callers
Method
plot
Plot the series using Matplotlib. Parameters ---------- new_plot Whether to spawn a new axis to plot on. See also
darts/timeseries.py:4422
↓ 29 callers
Function
create_lagged_training_data
Creates the features array `X` and labels array `y` to train a lagged-variables `SKLearnModel` (e.g. an `sklearn` model); the time index valu
darts/utils/data/tabularization/tabularization.py:440
↓ 29 callers
Method
max
Return a new series with the maximum computed over the specified `axis`. If we reduce over time (``axis=0``), the series will have length one
darts/timeseries.py:4786
↓ 28 callers
Function
create_lagged_prediction_data
Creates the features array `X` to produce a series of prediction from an already-trained `SKLearnModel`; the time index values of each observ
darts/utils/data/tabularization/tabularization.py:606
↓ 28 callers
Function
gaussian_timeseries
Creates a gaussian univariate TimeSeries by sampling all the series values independently, from a gaussian distribution with mean `mean` and s
darts/utils/timeseries_generation.py:225
↓ 27 callers
Function
get_series_seq_type
Returns the sequence type of `ts`. - SeriesType.SINGLE: `TimeSeries` (e.g. a single series) - SeriesType.SEQ: sequence of `TimeSeries` (e.g.
darts/utils/ts_utils.py:188
↓ 27 callers
Method
helper_routine
(idx, attr, vals_exp, **kwargs)
darts/tests/utils/test_timeseries_generation.py:348
↓ 27 callers
Method
min
Return a new series with the minimum computed over the specified `axis`. If we reduce over time (``axis=0``), the series will have length one
darts/timeseries.py:4757
↓ 26 callers
Method
__init__
(self)
darts/datasets/datasets.py:320
↓ 26 callers
Method
diff
Return a new series with differenced values. This is often used to make a time series stationary. Parameters ----------
darts/timeseries.py:2984
↓ 26 callers
Method
helper_create_DLinearModel
( self, work_dir: str | None = None, model_name: str = "unitest_model", add_en
darts/tests/models/forecasting/test_torch_forecasting_model.py:2878
↓ 26 callers
Function
likelihood_component_names
Generates formatted likelihood parameter names for components and parameter names. The order of the returned names is: `[comp1_param_1, ... comp1
darts/utils/likelihood_models/base.py:131
↓ 26 callers
Method
plotly
Plot the series using Plotly. Parameters ---------- fig Optionally, a Plotly `go.Figure` object to plot on. If pr
darts/timeseries.py:4513
↓ 26 callers
Method
schema
Return the schema of the series as a dictionary. Can be used to create new `TimeSeries` with the same schema. The keys and values ar
darts/timeseries.py:1945
↓ 26 callers
Function
sine_timeseries
Creates a univariate TimeSeries with a sinusoidal value progression with a given frequency, amplitude, phase and y offset. Parameters
darts/utils/timeseries_generation.py:156
↓ 25 callers
Function
_build_tqdm_iterator
Build an iterable, possibly using tqdm (either in notebook or regular mode) Parameters ---------- iterable verbose total
darts/utils/utils.py:94
↓ 25 callers
Function
_check_input
Input `series` checks used for Aggregators, Detectors, ... - `series` must be (sequence of) series with length (`num_series_expected`) where
darts/ad/utils.py:681
↓ 25 callers
Function
_get_values_or_raise
Returns the processed numpy values of two time series. Processing can be customized with arguments `intersect, q, remove_nan_union, is_classificat
darts/metrics/utils.py:564
↓ 25 callers
Function
helper_create_multivariate_linear_timeseries
Helper function that creates a `linear_timeseries` with a specified number of components. To help distinguish each component from one another
darts/tests/utils/tabularization/test_create_lagged_training_data.py:22
↓ 25 callers
Method
load_weights
Loads the weights from a manually saved model (saved with :meth:`save() <TorchForecastingModel.save()>`). Note: This method needs to
darts/models/forecasting/torch_forecasting_model.py:2471
↓ 25 callers
Function
train_test_split
Splits the provided series into training and test series. Supports splitting along the sample axis or time axis. If the input type is si
darts/utils/model_selection.py:209
↓ 25 callers
Method
with_columns_renamed
Return a new series with new columns/components names. It also adapts the names in the hierarchy, if any. Parameters -------
darts/timeseries.py:4597
↓ 24 callers
Function
get_shared_times_bounds
Returns the latest `start_time` and the earliest `end_time` among all non-`None` `series_or_times`; these are (non-tight) lower and upper `bo
darts/utils/data/tabularization/tabularization.py:1869
↓ 24 callers
Function
quantile_names
Generates formatted quantile names, optionally added to a component name. Parameters ---------- q A float or list of floats with
darts/utils/likelihood_models/base.py:152
↓ 24 callers
Method
shift
Return a new series where the time index was shifted by `n` steps. If :math:`n > 0`, shifts into the future. If :math:`n < 0`, shifts into th
darts/timeseries.py:2936
↓ 23 callers
Method
slice
Return a slice of the series starting at `start_ts` and ending before `end_ts`. For series having DatetimeIndex, this is inclusive on both en
darts/timeseries.py:2586
next →
1–100 of 3,734, ranked by callers