Biased random walk

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite
1












I have an undirected graph $G$ and when performing a random walk on the graph $G$, I visit a node $u$ with probability proportional to $d_u$ where $d_u$ is degree of node $u$.



I know there exists ways like Metropolis Hastings to redefine edge probabilities such that the probability of visiting a node is 1/|V|.



Given that I have another quality value $q_u$ of every node, is there a way to redefine the edge probabilities so I sample nodes with probability proportional to $q_u$.



I know I can do the sampling of nodes uniformly first and then do rejection sampling but I wanted to know if there is a way to directly do the sampling from the graph by changing transition probabilities online.







share|cite|improve this question























    up vote
    2
    down vote

    favorite
    1












    I have an undirected graph $G$ and when performing a random walk on the graph $G$, I visit a node $u$ with probability proportional to $d_u$ where $d_u$ is degree of node $u$.



    I know there exists ways like Metropolis Hastings to redefine edge probabilities such that the probability of visiting a node is 1/|V|.



    Given that I have another quality value $q_u$ of every node, is there a way to redefine the edge probabilities so I sample nodes with probability proportional to $q_u$.



    I know I can do the sampling of nodes uniformly first and then do rejection sampling but I wanted to know if there is a way to directly do the sampling from the graph by changing transition probabilities online.







    share|cite|improve this question





















      up vote
      2
      down vote

      favorite
      1









      up vote
      2
      down vote

      favorite
      1






      1





      I have an undirected graph $G$ and when performing a random walk on the graph $G$, I visit a node $u$ with probability proportional to $d_u$ where $d_u$ is degree of node $u$.



      I know there exists ways like Metropolis Hastings to redefine edge probabilities such that the probability of visiting a node is 1/|V|.



      Given that I have another quality value $q_u$ of every node, is there a way to redefine the edge probabilities so I sample nodes with probability proportional to $q_u$.



      I know I can do the sampling of nodes uniformly first and then do rejection sampling but I wanted to know if there is a way to directly do the sampling from the graph by changing transition probabilities online.







      share|cite|improve this question











      I have an undirected graph $G$ and when performing a random walk on the graph $G$, I visit a node $u$ with probability proportional to $d_u$ where $d_u$ is degree of node $u$.



      I know there exists ways like Metropolis Hastings to redefine edge probabilities such that the probability of visiting a node is 1/|V|.



      Given that I have another quality value $q_u$ of every node, is there a way to redefine the edge probabilities so I sample nodes with probability proportional to $q_u$.



      I know I can do the sampling of nodes uniformly first and then do rejection sampling but I wanted to know if there is a way to directly do the sampling from the graph by changing transition probabilities online.









      share|cite|improve this question










      share|cite|improve this question




      share|cite|improve this question









      asked Aug 2 at 18:11









      learner

      10613




      10613




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          Presumably all $q_u > 0$.
          Assuming your graph is connected, and you allow the process to sometimes stay at a vertex rather than jump, it is possible. Let $p_ij$ be the transition probability for moving from $i$ to $j$ ($0$ unless either $i,j$ is an edge or
          $i=j$). Your process will be reversible if for each edge $i,j$, $q_i p_ij = q_j p_ji$. This would be satisfied if $p_ij = q_j$ for all edges $i,j$, but that might make the sum of transition probabilities leaving some nodes $> 1$.
          Therefore if $M = max_i sum_j in N(i) q_j$, we take
          $$eqalignp_ij &= q_j/Mcr p_ii &= 1 - sum_j in N(i) q_j/M$$






          share|cite|improve this answer





















            Your Answer




            StackExchange.ifUsing("editor", function ()
            return StackExchange.using("mathjaxEditing", function ()
            StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
            StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
            );
            );
            , "mathjax-editing");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "69"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            noCode: true, onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2870341%2fbiased-random-walk%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote



            accepted










            Presumably all $q_u > 0$.
            Assuming your graph is connected, and you allow the process to sometimes stay at a vertex rather than jump, it is possible. Let $p_ij$ be the transition probability for moving from $i$ to $j$ ($0$ unless either $i,j$ is an edge or
            $i=j$). Your process will be reversible if for each edge $i,j$, $q_i p_ij = q_j p_ji$. This would be satisfied if $p_ij = q_j$ for all edges $i,j$, but that might make the sum of transition probabilities leaving some nodes $> 1$.
            Therefore if $M = max_i sum_j in N(i) q_j$, we take
            $$eqalignp_ij &= q_j/Mcr p_ii &= 1 - sum_j in N(i) q_j/M$$






            share|cite|improve this answer

























              up vote
              1
              down vote



              accepted










              Presumably all $q_u > 0$.
              Assuming your graph is connected, and you allow the process to sometimes stay at a vertex rather than jump, it is possible. Let $p_ij$ be the transition probability for moving from $i$ to $j$ ($0$ unless either $i,j$ is an edge or
              $i=j$). Your process will be reversible if for each edge $i,j$, $q_i p_ij = q_j p_ji$. This would be satisfied if $p_ij = q_j$ for all edges $i,j$, but that might make the sum of transition probabilities leaving some nodes $> 1$.
              Therefore if $M = max_i sum_j in N(i) q_j$, we take
              $$eqalignp_ij &= q_j/Mcr p_ii &= 1 - sum_j in N(i) q_j/M$$






              share|cite|improve this answer























                up vote
                1
                down vote



                accepted







                up vote
                1
                down vote



                accepted






                Presumably all $q_u > 0$.
                Assuming your graph is connected, and you allow the process to sometimes stay at a vertex rather than jump, it is possible. Let $p_ij$ be the transition probability for moving from $i$ to $j$ ($0$ unless either $i,j$ is an edge or
                $i=j$). Your process will be reversible if for each edge $i,j$, $q_i p_ij = q_j p_ji$. This would be satisfied if $p_ij = q_j$ for all edges $i,j$, but that might make the sum of transition probabilities leaving some nodes $> 1$.
                Therefore if $M = max_i sum_j in N(i) q_j$, we take
                $$eqalignp_ij &= q_j/Mcr p_ii &= 1 - sum_j in N(i) q_j/M$$






                share|cite|improve this answer













                Presumably all $q_u > 0$.
                Assuming your graph is connected, and you allow the process to sometimes stay at a vertex rather than jump, it is possible. Let $p_ij$ be the transition probability for moving from $i$ to $j$ ($0$ unless either $i,j$ is an edge or
                $i=j$). Your process will be reversible if for each edge $i,j$, $q_i p_ij = q_j p_ji$. This would be satisfied if $p_ij = q_j$ for all edges $i,j$, but that might make the sum of transition probabilities leaving some nodes $> 1$.
                Therefore if $M = max_i sum_j in N(i) q_j$, we take
                $$eqalignp_ij &= q_j/Mcr p_ii &= 1 - sum_j in N(i) q_j/M$$







                share|cite|improve this answer













                share|cite|improve this answer



                share|cite|improve this answer











                answered Aug 2 at 18:38









                Robert Israel

                303k22200440




                303k22200440






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2870341%2fbiased-random-walk%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    What is the equation of a 3D cone with generalised tilt?

                    Color the edges and diagonals of a regular polygon

                    Relationship between determinant of matrix and determinant of adjoint?