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

feat: add Model STWave #434

Closed hczs closed 3 months ago

hczs commented 3 months ago

任务执行配置信息

PEMSD8

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

{
  "batch_size": 64,
  "cache_dataset": true,
  "num_workers": 0,
  "pad_with_last_sample": false,

  "train_rate": 0.6,
  "eval_rate": 0.2,

  "scaler": "standard",
  "load_external": false,
  "normal_external": false,
  "ext_scaler": "none",
  "input_window": 12,
  "output_window": 12,
  "add_time_in_day": false,
  "add_day_in_week": false,
  "normalized_k": 0
}

模型配置文件(STWave.json)

{
  "max_epoch": 200,

  "learner": "adam",
  "learning_rate": 0.001,

  "lr_decay": true,
  "lr_scheduler": "ReduceLROnPlateau",
  "lr_decay_ratio": 0.1,
  "lr_patience": 20,
  "lr_threshold": 0.001,

  "clip_grad_norm": true,
  "max_grad_norm": 5,
  "use_early_stop": false,

  "heads": 8,
  "dims": 16,
  "layers": 2,
  "samples": 1,
  "wave": "coif1",
  "level": 1
}

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

{
  "gpu": true,
  "gpu_id": 0,
  "max_epoch": 100,
  "train_loss": "none",
  "epoch": 0,
  "learner": "adam",
  "learning_rate": 0.01,
  "weight_decay": 0,
  "lr_epsilon": 1e-8,
  "lr_beta1": 0.9,
  "lr_beta2": 0.999,
  "lr_alpha": 0.99,
  "lr_momentum": 0,
  "lr_decay": false,
  "lr_scheduler": "multisteplr",
  "lr_decay_ratio": 0.1,
  "steps": [5, 20, 40, 70],
  "step_size": 10,
  "lr_T_max": 30,
  "lr_eta_min": 0,
  "lr_patience": 10,
  "lr_threshold": 1e-4,
  "clip_grad_norm": false,
  "max_grad_norm": 1.0,
  "use_early_stop": false,
  "patience": 50,
  "log_level": "INFO",
  "log_every": 1,
  "saved_model": true,
  "load_best_epoch": true,
  "hyper_tune": false
}

PEMSD7

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

{
  "batch_size": 16,
  "cache_dataset": true,
  "num_workers": 0,
  "pad_with_last_sample": false,

  "train_rate": 0.6,
  "eval_rate": 0.2,

  "scaler": "standard",
  "load_external": false,
  "normal_external": false,
  "ext_scaler": "none",
  "input_window": 12,
  "output_window": 12,
  "add_time_in_day": false,
  "add_day_in_week": false,
  "normalized_k": 0
}

模型配置文件(STWave.json)

{
  "max_epoch": 200,

  "learner": "adam",
  "learning_rate": 0.001,

  "lr_decay": true,
  "lr_scheduler": "ReduceLROnPlateau",
  "lr_decay_ratio": 0.1,
  "lr_patience": 20,
  "lr_threshold": 0.001,

  "clip_grad_norm": true,
  "max_grad_norm": 5,
  "use_early_stop": false,

  "heads": 8,
  "dims": 16,
  "layers": 2,
  "samples": 1,
  "wave": "db1",
  "level": 1
}

执行器配置与上面的PEMSD8执行器配置一致

任务执行结果

模型评价指标对比如下