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-10-20 14:25:31.001082  1.784833
    1 2022-10-20 14:26:31.001082  1.746456
    2 2022-10-20 14:27:31.001082  1.638597
    3 2022-10-20 14:28:31.001082  1.866293
    4 2022-10-20 14:29:31.001082  1.758238

source on GitHub