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 MegaCRN #427

Closed hczs closed 4 months ago

hczs commented 4 months ago

任务执行配置信息

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

{
  "batch_size": 64,
  "cache_dataset": true,
  "num_workers": 0,
  "pad_with_last_sample": true,
  "train_rate": 0.7,
  "eval_rate": 0.1,
  "scaler": "standard",
  "load_external": true,
  "normal_external": false,
  "ext_scaler": "none",
  "input_window": 12,
  "output_window": 12,
  "add_time_in_day": true,
  "add_day_in_week": false
}

模型配置文件(MegaCRN.json)

{
  "rnn_units": 64,
  "num_layers": 1,
  "cheb_k": 3,
  "ycov_dim": 1,
  "cl_decay_steps": 2000,
  "use_curriculum_learning": true,
  "mem_num": 20,
  "mem_dim": 64,
  "lamb": 0.01,
  "lamb1": 0.01
}

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

{
  "max_epoch": 200,
  "learner": "adam",
  "learning_rate": 0.01,
  "lr_epsilon": 0.001,
  "lr_decay": true,
  "lr_scheduler": "multisteplr",
  "lr_decay_ratio": 0.1,
  "milestones": [50,100],
  "clip_grad_norm": true,
  "max_grad_norm": 5,
  "use_early_stop": true,
  "patience": 20
}

任务执行结果

模型评价指标对比如下

hczs commented 4 months ago

最新的提交 https://github.com/LibCity/Bigscity-LibCity/pull/427/commits/0418d71c226b6ab3c9de9787a84537ccbacbe457 已修改以上问题:

  1. input_dim 和 output_dim 取值方式
  2. calculate_loss 放到模型中实现
  3. 简化整理 executor 中的代码,并整理模型和执行器配置文件内容