Auto#

Module for AutoML utilities.

Basic usage#

import pathlib

import pandas as pd

from etna.auto import Auto
from etna.datasets import TSDataset
from etna.metrics import SMAPE

CURRENT_DIR_PATH = pathlib.Path(__file__).parent

if __name__ == "__main__":
   df = pd.read_csv(CURRENT_DIR_PATH / "data" / "example_dataset.csv")
   ts = TSDataset(df, freq="D")

   # Create Auto object for greedy search
   # All trials will be saved in sqlite database
   # You can use it later for analysis with ``Auto.summary``
   auto = Auto(
      target_metric=SMAPE(),
      horizon=14,
      experiment_folder="auto-example",
   )

   # Get best pipeline
   best_pipeline = auto.fit(ts, catch=(Exception,))
   print(best_pipeline)

   # Get all metrics of greedy search
   print(auto.summary())

API details#

Auto classes:

Auto(target_metric, horizon[, ...])

Automatic pipeline selection via defined or custom pipeline pool.

Tune(pipeline, target_metric, horizon[, ...])

Automatic tuning of custom pipeline.

Pre-defined pool with pipelines:

Pool(value)

Predefined pools of pipelines.

Runners:

runner.AbstractRunner()

Abstract class for Runner.

runner.LocalRunner()

LocalRunner for one threaded run.

runner.ParallelLocalRunner([n_jobs, ...])

ParallelLocalRunner for multiple parallel runs with joblib.