module timeseries.datasets#

Short summary#

module mlinsights.timeseries.datasets

Datasets for timeseries.

source on GitHub

Functions#

function

truncated documentation

artificial_data

Generates articial data every minutes.

Documentation#

Datasets for timeseries.

source on GitHub

mlinsights.timeseries.datasets.artificial_data(dt1, dt2, minutes=1)#

Generates articial data every minutes.

Parameters
  • dt1 – first date

  • dt2 – second date

  • minutes – interval between two observations

Returns

dataframe

<<<

import datetime
from mlinsights.timeseries.datasets import artificial_data

now = datetime.datetime.now()
data = artificial_data(now - datetime.timedelta(40), now)
print(data.head())

>>>

                            time         y
    0 2022-08-18 08:56:07.186920  2.260462
    1 2022-08-18 08:57:07.186920  1.922926
    2 2022-08-18 08:58:07.186920  2.074221
    3 2022-08-18 08:59:07.186920  1.778569
    4 2022-08-18 09:00:07.186920  1.824560

source on GitHub