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-07-07 08:54:33.405629  2.000456
    1 2022-07-07 08:55:33.405629  1.797506
    2 2022-07-07 08:56:33.405629  2.030604
    3 2022-07-07 08:57:33.405629  2.029202
    4 2022-07-07 08:58:33.405629  2.043137

source on GitHub