From 627b4797d35511ee93ea6c213083ba8dc8a2a9a9 Mon Sep 17 00:00:00 2001 From: jmoo2880 Date: Thu, 26 Dec 2024 18:47:55 +1100 Subject: [PATCH] add demo dataset plot in docs --- docs/src/figures/demo_dataset.svg | 100 ++++++++++++++++++++++++++++++ docs/src/tutorial.md | 8 ++- 2 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 docs/src/figures/demo_dataset.svg diff --git a/docs/src/figures/demo_dataset.svg b/docs/src/figures/demo_dataset.svg new file mode 100644 index 0000000..404a2c6 --- /dev/null +++ b/docs/src/figures/demo_dataset.svg @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/tutorial.md b/docs/src/tutorial.md index 08536a9..c39f5bf 100644 --- a/docs/src/tutorial.md +++ b/docs/src/tutorial.md @@ -12,14 +12,18 @@ x^c_t = \sin{\left(\frac{2\pi}{20}t + \psi\right)} + \frac{mt}{T} + \sigma_c n_t where ``m`` is the slope of a linear trend, ``\psi \in [0, 2\pi)`` is a uniformly random phase offset, ``\sigma_c`` is the noise scale, and ``n_t \sim \mathcal{N}(0,1)`` are normally distributed random variables. -The two classes will be distinguished by their noise levels. The class one time series ``x^1`` have ``\sigma_1 = 0.1``, and the class two time series ``x^2`` have ``\sigma_2 = 0.9``. The below code sets this up +The two classes will be distinguished by their noise levels. The class one time series ``x^1`` have ``\sigma_1 = 0.1``, and the class two time series ``x^2`` have ``\sigma_2 = 0.9``. +Here are a few time-series instances from each class: + +![](./figures/demo_dataset.svg) + +The below code sets this up: ```Julia # fix rng seed using Random rng = Xoshiro(1) - # trendy sine function function trendy_sine(T::Integer, n_inst::Integer, noise_std::Real, rng) X = Matrix{Float64}(undef, n_inst, T)