论文研读|基于混合时空模型的地铁客流预测

基于LSTM的城市轨道交通客流量预测(demo) 本数据集记录了2023年4~5月xiamenBRT45个站点的客流量(按小时划分,61d=61*24=1464h)。hours。基于过去7天的客流量数据预测未来1天的客流量数据。 阅读详情

本文是2022年IJGI上的一篇文章,作者创新地提出了一种混合神经网络模型GCTN(graph convolutional and comprehensive temporal neural network),该模型结合Transformer和LSTM捕捉全局和局部的时间依赖关系,此外使用GCN捕捉地铁网络的空间特征。结果表明该模型在客流高峰和快速变化时期具有更好的性能。

A Comprehensive Spatio-Temporal Model for Subway Passenger Flow Prediction

1. 背景

1.1 背景

随着城市人口的不断增加,城市交通也在迅速扩张,这对城市的可持续发展提出了新的挑战。与私家车相比,城市轨道交通可以减少与交通相关的能源消耗、出行成本、交通拥堵和环境污染。同时,研究表明,在城市轨道交通强度较高的城市,汽车保有量的增长相对较慢。因此,地铁、公交等公共交通设施在实现城市可持续发展中发挥着更加重要的作用。其中,由于交通流量大、运营速度快、占地面积小,地铁交通系统是消除城市交通束缚、缓解城市交通拥堵、构建城市立体交通系统的重要措施。此外,地铁排放的污染物更少,节约能源。因此,一个及时有效的地铁交通系统至关重要。

为了避免地铁资源不足导致的交通拥堵或交通瘫痪,可以利用客流预测来实现交通资源的有效分配。机器学习方法可以通过足够的历史观测获得交通数据的非线性特征和统计规律,可以处理统计方法的问题,但在节点众多的复杂网络中很难取得良好的结果。它们主要依赖于复杂的手动特征工程,这导致对海量数据建模缺乏鲁棒性,并且无法处理原始时空数据。因此,机器学习方法很难在丰富的时空数据的基础上获得最佳的预测结果。

深度学习方法可以自动建立特征工程并改进特征表达。此外,深度学习模型在捕捉非线性和复杂模式方面具有优势,这可以帮助它们获得更准确的结果。交通流预测本质上依赖于历史观测。因此,时间依赖是不可或缺的一部分。然而,一些深度学习模型只考虑了客流的时间依赖性,而忽略了空间依赖性。这样,交通预测就脱离了道路和车站等空间因素。通过整合空间相关性,可以进一步提高模型的准确性。因此,针对单一模型在客流预测中的不足,一些研究引入CNN对空间依赖性进行建模,并将其与RNN 模型及其变体模型。

由于地铁网络的非欧氏和时变特性,CNN很难描述复杂的空间拓扑关系。因此,一些深度学习模型引入了图卷积神经网络(GCN),以改进对客流中时空特征的捕获。同时,RNN模型在捕捉时间依赖性方面存在局限性。注意力模型可以捕捉全局和动态时空特征,这有助于预测。一些深度学习模型将注意力模型引入交通流预测领域。然而,一些知识差距仍然存在。统计方法很难捕捉复杂的特征。机器学习方法在很大程度上依赖于人工设计的特性。

关于深度学习方法,现有模型仍存在以下差距:

a. 在地铁客流预测中,大多数基于GCN的方法忽略了对相邻矩阵的改进。首先,他们忽视了地铁站进出口的空间影响。其次,他们忽视了全局对局部的影响。

b. 大多数方法基于单个模型来捕获时间依赖性,例如RNN模型及其变体或Transformer 模型。然而,这些模型在捕捉所有时间特征方面仍然存在局限性。

c. 交通预测通常分为两个尺度,即短期(<30分钟)和长期。目前,地铁客流预测多为短期预测。然而,长期流量预测也非常重要,可以为运营调度提供更充分的准备。

1.2 问题研究

综上所述,本文为了解决以上问题,提出了GCTN,该模型可以对全局和局部的时空依赖性进行综合建模。在探索地铁客流后,本文将客流数据分为三种模式:近期、每日以及每周。并尝试多种融合方法探索几种

基于PyTorch和LSTM的交通客流预测 然后,我们使用训练好的模型对新的交通客流数据进行预测。以上是一个简单的示例,你可以根据实际情况进行修改和扩展,例如调整模型的结构、超参数的设置,以及增加更多的特征工程等。我们将使用这些历史数据来训练模型,并使用训练好的模型来预测未来的交通客流。模型的前向传播函数中,我们首先将输入数据传入LSTM层,然后取最后一个时间步的输出作为模型的输出,最后通过全连接层进行预测。完成模型的训练后,我们可以使用训练好的模型来进行交通客流的预测。在上述代码中,我们将测试数据转换为Tensor,并使用训练好的模型进行预测。 阅读详情

相关推荐

【Coze 扣子案例】第 23 期・商业篇:一键获取精准商机,自动化招标信息查询与分析

通过地区和项目类型等多维度组合查询全国招标信息网数据,实现招标公告的快速定位。自动解析招标公告内容,提取关键信息,并生成结构化摘要。帮助企业高效获取精准商机,提升市场竞争力,降低人工成本,解决 “信息过载” 与 “精准匹配难” 的双重问题。

weixin_72689845的博客 1928

保姆级教程:将YOLOv8模型封装成Docker镜像,集成到CVAT实现自动标注

本文提供了一份详细的保姆级教程,指导如何将YOLOv8模型封装成Docker镜像并集成到CVAT平台,实现自动化标注。通过环境配置、模型服务化封装、Docker镜像构建与优化、CVAT平台集成等步骤,帮助开发者高效完成计算机视觉项目的自动标注工作流,显著提升标注效率。

weixin_28692817的博客 415

R3LIVE项目实战(3) —双目相机与激光雷达 lidar_camera_calib联合标定

lidar_camera_calib是一个在无目标环境中,用于高分辨率LiDAR(例如Livox)和摄像机之间准确的外部标定工具。我们的算法可以在室内和室外场景中运行,并且只需要场景中的边缘信息。如果场景适合,我们可以实现类似于或甚至超过基于目标的方法的像素级准确度。我们使用标定的外部参数给点云上色,并与实际图像进行比较。A和C是点云的局部放大视图。B和D是与A和C中的点云对应的摄像机图像的部分。

几度春风里的博客 4057

模型泛化能力提升:领域自适应与迁移学习

模型泛化能力提升:领域自适应与迁移学习​ ,人工智能,计算机视觉,大模型,AI,在机器学习和深度学习的应用中,模型的泛化能力是一个关键问题。泛化能力指的是模型在新的、未见过的数据上表现良好的能力。然而,实际情况中,训练数据和测试数据往往来自不同的领域,存在分布差异,这会导致模型的泛化能力下降。领域自适应与迁移学习正是为了解决这一问题而发展起来的重要技术。

不踩坑,不知道坑有多深;不总结,踩过的坑白踩。 3万+

【AUTOSAR-E2E】-2.3-配置E2E:基于E2EPW配置一个RX接收的Signal Group(使用E2E Profile 1)

《共13页精讲》:此法也适用于E2E Profile 4/5/6/7/11/22 目录 1 检查CAN Matrix Arxml/DBC是否满足E2E需求 2 在DaVinci Developer中为Port添加E2E保护 3 在DaVinci Configurator settings设置 4 如何使用应用层的E2E保护 5 结尾 <--返回「Autosar_BSW高阶配置」总目录--> <--返回「Autosar_BSW高阶配置」专栏主页--> <-.

「汽车电子助手」的博客 3952

权重衰减weight_decay参数从入门到精通

Weight Decay是一个正则化技术,作用是**抑制模型的过拟合**,以此来提高模型的泛化性。 目前网上对于Weight Decay的讲解都比较泛,都是短短的几句话,但对于其原理、实现方式大多就没有讲解清楚,本文将会逐步解释weight decay机制。

iioSnail的博客 4万+

AFL源码分析之afl-as.c详细注释

前言 afl-as注释好了,明白了是如何进行插桩的,以及插在哪里 本文主要参考Sakura大佬文章:https://eternalsakura13.com/2020/08/23/afl/ 编写不易,如果能够帮助到你,希望能够点赞收藏加关注哦Thanks♪(・ω・)ノ /* Copyright 2013 Google LLC All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); y

hollk’s blog 2172

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

上一篇: 论文研读 | 大模型时序应用——基于对比学习的时序数据embedding
下一篇: LLM4TS:使用预训练的 LLM 进行时间序列预测的两阶段微调
时空大数据小组
博客等级 码龄5年 179粉丝 21原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值