Skip to content

Random walks on weighted networks #52

@user1246638

Description

@user1246638

Example

import pathpy as pp
import numpy as np

nwk = pp.algorithms.random_graphs.erdoes_renyi_gnm(10,20)
for edge in nwk_w1.edges:
    nwk.edges[edge]["weight"] = np.random.random()
pp.algorithms.random_walk.generate_walk(nwk)

The problem is that the probabilities are not weighted, because weights are not normalized.
The thing is that in an udirected network they cannot be normalized, for example, take graph
A-B-C
because A and C have only one link, weights have to be 1 on both AB and BC edges. But then weights around B are not normalized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions