LibCity / Bigscity-LibCity

LibCity: An Open Library for Urban Spatial-temporal Data Mining
https://libcity.ai/
Apache License 2.0
934 stars 168 forks source link

Add model TimeMixer #420

Closed hczs closed 6 months ago

hczs commented 6 months ago

任务执行配置信息

数据集配置文件(TrafficStatePointDataset.json)

{
  "batch_size": 32,
  "cache_dataset": true,
  "num_workers": 0,
  "pad_with_last_sample": true,
  "train_rate": 0.6,
  "eval_rate": 0.2,
  "scaler": "standard",
  "load_external": false,
  "normal_external": false,
  "ext_scaler": "none",
  "input_window": 96,
  "output_window": 12,
  "add_time_in_day": false,
  "add_day_in_week": false
}

模型配置文件(TimeMixer.json)

{
  "label_len": 0,
  "down_sampling_layers": 1,
  "down_sampling_window": 2,
  "down_sampling_method": "avg",
  "channel_independence": 0,
  "e_layers": 5,
  "d_model": 128,
  "d_ff": 256,
  "use_norm": 0,
  "freq": "h",
  "embed": "timeF",
  "decomp_method": "moving_avg",
  "moving_avg": 25,
  "dropout": 0.1
}

执行器配置信息(TimeMixerExecutor.json)

{
  "gpu": true,
  "gpu_id": 0,
  "max_epoch": 10,
  "train_loss": "none",
  "epoch": 0,

  "learner": "adam",
  "learning_rate": 0.003,
  "weight_decay": 0,
  "lr_epsilon": 1e-8,
  "lr_beta1": 0.9,
  "lr_beta2": 0.999,
  "lr_alpha": 0.99,
  "lr_momentum": 0,

  "lr_decay": true,
  "lr_scheduler": "onecyclelr",
  "pct_start": 0.2,

  "clip_grad_norm": false,
  "max_grad_norm": 1.0,
  "use_early_stop": true,
  "patience": 10,
  "log_level": "INFO",
  "log_every": 1,
  "saved_model": true,
  "load_best_epoch": true,
  "hyper_tune": false
}

任务执行结果

模型评价指标对比如下,TimeMixer 列的指标数据是跑的作者的源代码的结果