prepare_inference_data

src.lookoutequipment.dataset.prepare_inference_data(root_dir, sample_data_dict, bucket, prefix, num_sequences=3, frequency=5, start_date=None)

This function prepares sequence of data suitable as input for an inference scheduler.

Parameters
  • root_dir (string) – Location where the inference data will be written

  • sample_data_dict (dict) – A dictionnary with the sample data as output by load_dataset() method

  • bucket (string) – Amazon S3 bucket name

  • prefix (string) – Prefix to a directory on Amazon S3 where to upload the data. This prefix MUST end with a trailing slash “/”

  • num_sequences (integer) – Number of short time series sequences to extract: each sequence will be used once by a scheduler. Defaults to 3: a scheduler will run 3 times before failing (unless you provide additional suitable files in the input location)

  • frequency (integer) – The scheduling frequency in minutes: this MUST match the resampling rate used to train the model (defaults to 5 minutes)

  • start_date (string or datetime) – The datetime to start the extraction from. Default is None: in this case this method will start looking at date located at the beginning of the evaluation period associated to this sample