加权页面排名图表示 [英] Weighted page rank graph representation

查看:93
本文介绍了加权页面排名图表示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个像这样的图:

(A, 900, B) //implying it takes 900 hours to move from task A to task B
(B, 800, C) // implying it takes 800 hours to move from B to C.

现在,我认为在页面排名算法中,任务C应该具有更高的页面排名.但这没有发生.我正在使用Neo4j的页面等级算法来导入图形.我的问题是我以不正确的方式表示图形.

Now I assume in my page rank algorithm task C should have higher page rank. But it is not happening. I am using Neo4j's page rank algorithm to import the graph. My question is am I representing the graph in an incorrect way.

我认为这是表示图形并基于图形计算页面等级的普遍问题.

I think this is a general problem of representing graphs and calculating page ranks based on them.

我应该将图形表示为:

(A, 900/1700, B) //implying weight of edge is 900/1700, where 1700 is sum of edge weights
(B, 800/1700, C) // implying weight of edge is 800/1700

我也用python编写了一个程序,但是基本问题是如何表示边缘图相同

I also wrote a program in python, but the basic question is the same how to represent the edge graph

推荐答案

您可以将边缘的权重用作两个节点之间关系的属性.

You can use the weight of the edge as the property of the relationship between the two nodes.

(A)-[:CONNECTED_TO {"Time" : 900 }]->(B)

我希望这种格式能对您有所帮助.要进行进一步的应用,您可以参考文档

I hope this format helps. For further application, you can refer the docs

这篇关于加权页面排名图表示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆