Coder Social home page Coder Social logo

dmvst_net's Introduction

DMVST_Net

包括部分数据预处理以及基于Tensorflow的DMVST_Net模型的实现,数据用的是2016年1月份纽约市的数据

原始数据

数据预处理

  • Spatial_longitude_latitude.py:将纽约市按照经纬度划分为不同的地区
  • Spatial_time_id_to_txt.py:将对应预测地区在某一时刻的9*9需求像素矩阵拉成为81维向量存储在一个文件中
  • Temporal_weather_condition.py:处理纽约市的天气状况,不同的天气对应不同的数字

'Clear' :1
'Scattered clouds':2
'Few clouds':3
'Cloudy':4
'Overcast':5
'Few clouds, mnist':6
'fog':7
'rain':8
'snow':9
'Overcast, mist':10
'Overcast, rain':11
'Overcast, snow':12

  • Temporal_aq_data.py:处理纽约市的空气质量数据
  • Temporal_time_data.py:对应时刻是在一星期中的哪天,该天是否为节假日
  • Temporal_context_data_merge.py:将天气、空气质量、星期几、是否为节假日信息合并在一起作为时间视图中每个时刻输入的上下文数据
  • Semantic_demand_pattern.py:确定每个预测地区的需求模式
  • Semantic_weighted_graph.py:确定需求权重图中的权重
  • Semantic_embedding.py:用LINE方法生成语义向量(C++文件为LINE方法的实现代码,LINE方法源码地址

模型实现与数据集

  • DMVST_TFReacord.py:生成数据集
  • start.py:启动程序,运行该文件开始模型的训练
  • DMVST_Net_CNN.py:局部CNN的实现
  • DMVST_Net_LSTM,py:时间视图的实现
  • DMVST_Net_Semantic.py:语义视图的实现
  • DMVST_Net_forward.py:DMVST_Net模型的实现
  • DMVST_Net_backward.py:反向传播过程的实现

代码使用

  • 把原始数据文件下载到根目录
  • 把数据预处理文件按照之前的介绍顺序依次执行(处理时间比较长,其中生成语义向量文件程序可以中途停止生成,之后只要重启Semantic_embedding.py就可以从上次生成的位置继续生成)
  • 运行DMVST_TFReacord.py,生成数据集
  • 运行start.py开始模型训练(训练过程中会不断写入两个文件records1、verifying_resault1,前者记录每喂入10个batch后模型的一些信息,后者记录验证时的信息)

dmvst_net's People

Contributors

gyhmolo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.