论文笔记:Predicting mobile users‘ next location using the semantically enriched geo-embedding model and

Predicting mobile users' next location using the semantically enriched geo-embedding model and the multilayer attention mechanism

2023 Computers, Environment and Urban Systems

1 intro

  • 之前next location prediction的方法忽视了位置和时空信息之间的隐含相关性,从而限制了模型在位置预测准确性方面的表现
    • 论文提出了一种GEMA-BiLSTM(地理嵌入和多层注意力-双向长短期记忆)模型,用于预测用户移动中的下一个位置
    • 结合了位置和时空信息,提取了人类移动的语义

2 方法

2.1 方法整体

  • 提出了一个名为GEMA-BiLSTM的位置预测框架,将地理嵌入、多层注意机制和Bi-LSTM结合

2.2 地理信息嵌入

2.3 时空语义特征向量

2.4 BiLSTM

2.5 局部&全局注意力

3 实验

3.1 研究数据

  • 深圳

  • 从一家大型通信运营商处收集了1630万条移动电话信令数据(MPSD)轨迹
    • MPSD包含了重要信息,包括用户ID、时间记录和地理位置
    • 统计了所有用户连续记录的时间间隔,发现70.47%的时间间隔在30到60分钟之间

  • 根据统计分析,深圳市共有5943个基站
    • 基于基站绘制了Voronoi图,得到Thiessen多边形,并划分并统计了深圳市移动电话基站的服务区域
    • 通过计算所有Voronoi多边形的最近邻距离,可以比较模型的性能,例如距离误差水平
      • 大约92%的基站最近邻距离小于500米

  • 使用了2012年深圳的Autonavi POI数据来计算空间语义特征
    • 每行POI数据包含五个基本属性:纬度、经度、POI类别、名称和地址
    • 有15个原始POI类别,包括餐饮服务、工厂、政府机构、交通设施、教育和文化机构、住宅社区、购物商店、汽车服务、酒店、金融机构、商务办公、娱乐场所、医疗机构、旅游景点和行政地标

3.2 数据预处理和训练细节

3.2.1 数据预处理

  • MPSD经过四个步骤预处理
    • 选择轨迹组成数据集
      • 选择每小时至少有一个位置的轨迹。
      • 当某一时间间隔内有多个位置时,基于最长停留时间保留一个位置作为锚点
    • 选择轨迹数据用于词嵌入
      • 为了有效嵌入CBOW模型,数据集中的轨迹需要对应每小时,并包含总共24个位置
      • 在CBOW模型中,嵌入向量大小设为300,窗口大小c设为5
    • 组织输入数据
      • 记录数据组织如下:{l1, t1, s1; l2, t2, s2; …; li, ti, si; …; lM, tM, sM}
        • li是Voronoi图中用户移动记录的第i个位置的Thiessen多边形索引。
        • ti表示第i次离散化时刻。
        • si表示第i个位置的地理语义向量,由Thiessen多边形中不同POI类别的吸引力组成
      • 在比较模型中,训练数据集的形式重新组织
        • 输入数据形式为:{l1, t1; l2, t2; …; li, ti; …; lM, tM}

3.2.2 POI重新分类

  • 为了确定用户的出行语义,按照Li等人(2021)建议重新分类了POI类别
    • 使用TF-IDF算法计算了Thiessen多边形内不同POI类别的比例
    • 具有最高吸引力的POI类别作为基站的功能语义

3.3 结果

  • 23
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
Sure, here's an example LSTM model for predicting the polarity of movie reviews using the IMDB dataset in Keras: ```python from keras.datasets import imdb from keras.preprocessing import sequence from keras.models import Sequential from keras.layers import Dense, Embedding, LSTM # Load the IMDB dataset max_features = 20000 maxlen = 80 batch_size = 32 (x_train, y_train), (x_test, y_test) = imdb.load_data(num_words=max_features) # Pad sequences to a fixed length x_train = sequence.pad_sequences(x_train, maxlen=maxlen) x_test = sequence.pad_sequences(x_test, maxlen=maxlen) # Define the model architecture model = Sequential() model.add(Embedding(max_features, 128)) model.add(LSTM(128, dropout=0.2, recurrent_dropout=0.2)) model.add(Dense(1, activation='sigmoid')) # Compile the model model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy']) # Train the model model.fit(x_train, y_train, batch_size=batch_size, epochs=5, validation_data=(x_test, y_test)) # Evaluate the model on test data score, acc = model.evaluate(x_test, y_test, batch_size=batch_size) print('Test score:', score) print('Test accuracy:', acc) ``` Here, we first load the IMDB dataset and pad the sequences to a fixed length of 80. Then, we define an LSTM model with an embedding layer, a LSTM layer with dropout, and a dense output layer with sigmoid activation. We compile the model with binary cross-entropy loss and Adam optimizer, and train it for 5 epochs on the training data. Finally, we evaluate the model on the test data and print the test score and accuracy.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

UQI-LIUWJ

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值