---
title: "lambdaTS 2.0: probabilistic multivariate forecasting"
author: "Giancarlo Vercellino"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{lambdaTS 2.0: probabilistic multivariate forecasting}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(collapse = TRUE, comment = "#>", eval = FALSE)
```

## Overview

`lambdaTS` fits a variational sequence-to-sequence model for jointly forecasting
multiple numeric time series. Version 2.0 keeps the original `lambdaTS()` API,
uses internal preprocessing helpers, and produces predictive samples and
interval summaries.

## Forecasting

```{r example}
library(lambdaTS)

result <- lambdaTS(
  data = bitcoin_gold_oil,
  target = c("gold_close", "oil_Close"),
  future = 10,
  past = 30,
  deriv = 1,
  epochs = 5,
  sample_n = 50,
  seed = 42
)
```

The returned `prediction` list contains horizon-by-horizon quantiles, means,
standard deviations, minima, and maxima. `feature_errors` reports validation
metrics on the original scale, while `history` and `plot` provide visual
diagnostics.

## Reproducibility

Set `seed` for reproducible preprocessing and torch initialization. The model
can use `dev = "cuda"` when a compatible torch installation and GPU are
available; CPU is the default.
