Comments (2)
Hi @gvas7,
I am assuming that the covariates you want to include in your optuna trial are actually columns/components of a single multivariate TimeSeries
(hence, a unique and shared time index) and not distinct Timeseries
with different time indexes.
You can simply use the __getitem__()
operator to extracts the components you want to use for a given trial with:
# ts_covs is the master TimeSeries containing all the covariates, select_covariates is a list of strings
future_covariates = ts_covs[selected_covariates]
If the covariates are stored in separate ts with exactly the same time index and you want to use the stack
method, you can use the snippet below. However, this is approach is not recommended because you will recreate a new TimeSeries
at each iteration.
trial_ts = None
# select_covariates is a list of univariate TimeSeries where all the TimeSeries have the exact same time index
for cov in selected_covariates:
if trial_ts is None:
trial_ts = cov
else:
trial_ts = trial_ts.stack(cov)
from darts.
So simple and I overthought it. Thank you for taking time to explain this and the first example is what I wanted to do and does exactly what I wanted. As your package gets more popular, more people like me will show up asking questions like this one :(
from darts.
Related Issues (20)
- Gridlines automatically created in matplotlib and seaborn plots [BUG] HOT 2
- How to mask or ignore target features during model training HOT 13
- Quantile forecasts are identical for all forecast horizons (XGBoost) HOT 2
- [BUG] TSMixer TimeBatchNorm2d using BatchNorm instead of LayerNorm HOT 6
- [BUG] Deterministic TFT model prediction not reproducable HOT 2
- TSMixer ConditionalMixer Skip Connections HOT 1
- [BUG] PLForecastingModule._calculate_metrics should call log_dict with batch_size HOT 2
- [BUG] TorchMetrics loop implementation isn't compatible with stateful metrics HOT 1
- [BUG] TCNModel changes the shape of data erroneously before loss evaluation HOT 3
- [BUG] TFTModel returns StopIteration on decoder_vsn() call in forward() HOT 3
- How to make TorchForecastingModel store the best model checkpoint? HOT 1
- New model - TimeMixer
- [BUG] Static covariates not added to val_series for RegressionModel HOT 1
- Embedding extraction for clustering HOT 1
- [BUG] Scaler took a long time to start fit
- [BUG] Distributed prediction crash HOT 2
- Loading historical forecasts of future covariates for training - forecast changes each time step
- [Question] How to plot prediction in tensorboard for torch/lightning models?
- Enhance integration of Global and Local models. HOT 2
- [QUESTION] from darts.explainability import TFTExplainer ImportError: cannot import name 'TFTExplainer' from 'darts.explainability' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from darts.