论文2
zhangbigxu
The best is yet to come
展开
-
8:GRU预测数据预处理
# 机器学习预测数据预处理from pygeohash import encode, decodeimport plotlyimport numpy as npimport pandas as pdimport mathfrom matplotlib.path import Pathimport numpy as npimport plotly.offline as ofimport plotly.graph_objs as goimport chart_studio.plotly a原创 2020-05-11 16:03:14 · 1160 阅读 · 0 评论 -
mysql每日汇总
SELECT DATE_FORMAT(departure_time,'%Y-%m-%d') as demand_time ,count(0) as count FROM haikou_1 where left(`geo`,6)='w7w3y2' AND DATE_FORMAT(departure_time,'%Y-%m-%d') BETWEEN '2017-06-01' AND '2017-08-31'GROUP BY demand_time ORDER BY demand_time原创 2020-05-11 10:36:58 · 343 阅读 · 0 评论 -
互信息实验折线图
import numpy as npimport plotly.offline as ofimport plotly.graph_objs as goimport plotly.plotly as py# https://plot.ly/python/reference/#layout-xaxis-zerolinecolor 官方文档gailv1 = [0.7620545634678...原创 2020-04-17 16:04:46 · 239 阅读 · 0 评论 -
90天的互信息计算(包含互信息和标准互信息)
#本代码使用2017-06-01到2017-08-29共30+31+29=90天,Unix时间戳是1496246400到1504022400(2017-08-30)零点#一天时间是86400import plotlyimport chart_studio.plotly as pyfimport plotly.graph_objs as goimport numpy as npimpor...原创 2020-04-17 15:33:33 · 576 阅读 · 0 评论 -
根据字典数据计算互信息
from sklearn import metricsimport mathimport numpy as npfrom sklearn import metricsfrom sklearn import metricsdef NMI(A,B): #此为计算互信息的函数,还可以计算标准互信息 #样本点数 total = len(A) A_ids = set(A)...原创 2020-04-17 14:11:30 · 345 阅读 · 0 评论 -
插入数据库geo(2)
from pygeohash import encode, decodeimport plotlyimport numpy as npimport pandas as pdimport mathfrom matplotlib.path import Pathimport numpy as npimport plotly.offline as ofimport plotly.gr...原创 2020-04-17 14:09:58 · 251 阅读 · 1 评论 -
互信息和标准互信息
import mathimport numpy as npfrom sklearn import metricsfrom sklearn import metricsdef NMI(A,B): #此为计算互信息的函数,还可以计算标准互信息 #样本点数 total = len(A) A_ids = set(A) B_ids = set(B) #互信息...原创 2020-04-17 14:05:46 · 1339 阅读 · 1 评论 -
5-6位Geohash图示例
5-6位Geohash图示例#可以显示乘客的定位及其对应的六位和七位Geohashimport plotlyimport chart_studio.plotly as pyfimport plotly.graph_objs as goimport numpy as npimport pandas as pdimport mathfrom matplotlib.path impor...原创 2020-04-17 11:06:14 · 3040 阅读 · 0 评论 -
前90天数据存字典
前90天数据存字典#本代码使用2017-06-01到2017-08-29共30+31+29=90天,Unix时间戳是1496246400到1504022400(2017-08-30)零点#一天时间是86400import plotlyimport chart_studio.plotly as pyfimport plotly.graph_objs as goimport numpy a...原创 2020-04-17 11:04:55 · 172 阅读 · 0 评论 -
插入数据库Geohash(haikou数据)
插入数据库Geohash(haikou数据)from pygeohash import encode, decodeimport plotlyimport numpy as npimport pandas as pdimport mathfrom matplotlib.path import Pathimport numpy as npimport plotly.offline...原创 2020-04-17 11:03:17 · 313 阅读 · 0 评论