{"id":15761370,"url":"https://github.com/benmaier/biasedrandomwalks","last_synced_at":"2026-06-29T15:31:48.318Z","repository":{"id":66123995,"uuid":"139504599","full_name":"benmaier/BiasedRandomWalks","owner":"benmaier","description":"Provides classes around biased random walks on networks.","archived":false,"fork":false,"pushed_at":"2018-07-03T21:35:56.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-09T12:22:55.780Z","etag":null,"topics":["biased-random-walk","graphs","networks","random-walk"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benmaier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-02T23:24:56.000Z","updated_at":"2024-05-26T09:01:44.000Z","dependencies_parsed_at":"2023-04-01T14:20:14.131Z","dependency_job_id":null,"html_url":"https://github.com/benmaier/BiasedRandomWalks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/benmaier/BiasedRandomWalks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benmaier%2FBiasedRandomWalks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benmaier%2FBiasedRandomWalks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benmaier%2FBiasedRandomWalks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benmaier%2FBiasedRandomWalks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benmaier","download_url":"https://codeload.github.com/benmaier/BiasedRandomWalks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benmaier%2FBiasedRandomWalks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34933498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["biased-random-walk","graphs","networks","random-walk"],"created_at":"2024-10-04T11:02:26.830Z","updated_at":"2026-06-29T15:31:48.294Z","avatar_url":"https://github.com/benmaier.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BiasedRandomWalks\n\nProvides classes around biased random walks on networks.\n\n## Install \n\n    $ git clone git@github.com:benmaier/BiasedRandomWalks.git \n    $ pip install ./BiasedRandomWalks\n\n## Examples\n\n```python\nimport numpy as np\nimport matplotlib.pyplot as pl\nimport networkx as nx\n\nfrom BiasedRandomWalks import BiasedRandomWalk\n\n# Create a test Graph with weighted edges where weights are distances\nG = nx.Graph()\nN = 4\nG.add_nodes_from(range(N))\nG.add_edge(0,1,weight=1)\nG.add_edge(0,2,weight=1)\nG.add_edge(1,2,weight=1)\nG.add_edge(1,3,weight=0.1)\nG.add_edge(2,3,weight=0.2)\n\n# define sink nodes\nsink_nodes = [2,]\n\n# define bias\ngamma = 1\n\n# initial distribution on transient\np0 = np.array([1,0,0])\n\n# initial distribution on all\np0_all = np.array([1,0,0,0])\n\n# initial base class (choose 'exponential' or 'scale free')\nRW = BiasedRandomWalk(G, gamma, sink_nodes, bias_kind = 'exponential')\n\nfig, ax = pl.subplots(2,2,figsize=(9,7))\n\n# integrate up to this time step\ntmax = 10\n\n# ========== prob density on sinks =========\nt, rho = RW.get_amount_of_walkers_arriving_at_sink_nodes(p0,tmax)\n\nfor i_s, s in enumerate(sink_nodes):\n    ax[0,0].plot(t, rho[:,i_s], label='sink node '+ str(s))\n\nax[0,0].legend()\nax[0,0].set_xlabel('time')\nax[0,0].set_ylabel('amount of walkers arriving')\n\n# ========== cdf on sinks =========\nt, rho = RW.get_amount_of_walkers_arrived_at_sink_nodes(p0,tmax)\n\nfor i_s, s in enumerate(sink_nodes):\n    ax[0,1].plot(t, rho[:,i_s], label='sink node '+ str(s))\n\nax[0,1].legend()\nax[0,1].set_xlabel('time')\nax[0,1].set_ylabel('total amount of walkers arrived')\n\n# ========== prob density on all =========\nt, rho = RW.get_amount_of_walkers_on_nodes(p0_all,tmax)\n\nfor s in G.nodes():\n    ax[1,0].plot(t, rho[:,s], label='node '+ str(s))\n\nax[1,0].legend()\nax[1,0].set_xlabel('time')\nax[1,0].set_ylabel('amount of walkers on each node')\n\n\npl.show()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenmaier%2Fbiasedrandomwalks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenmaier%2Fbiasedrandomwalks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenmaier%2Fbiasedrandomwalks/lists"}