{"action":"opened","issue":{"url":"https://api.github.com/repos/byzhang/graphchi/issues/28","labels_url":"https://api.github.com/repos/byzhang/graphchi/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/byzhang/graphchi/issues/28/comments","events_url":"https://api.github.com/repos/byzhang/graphchi/issues/28/events","html_url":"https://github.com/byzhang/graphchi/issues/28","id":59729553,"number":28,"title":"pagerank.cpp: would be nice to set the personalization vector","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/byzhang/graphchi/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/byzhang/graphchi/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/byzhang/graphchi/labels/Type-Enhancement","name":"Type-Enhancement","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-04T00:12:05Z","updated_at":"2015-03-04T00:12:05Z","closed_at":null,"body":"```\nLooking at this code snippet from example_apps/pagerank.cpp\n\n-- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8 \n#define RANDOMRESETPROB 0.15\n\n// ...\n\nstruct PagerankProgram :\n  public GraphChiProgram<VertexDataType,\n                         EdgeDataType> {\n\n  // ...\n  void update(graphchi_vertex<VertexDataType, EdgeDataType> &v,\n              graphchi_context &ginfo) {\n    float sum=0;\n    // ...\n    for(int i=0; i < v.num_inedges(); i++) {\n      float val = v.inedge(i)->get_data();\n      sum += val;                    \n    }\n            \n    /* Compute my pagerank */\n    float pagerank = RANDOMRESETPROB + (1 - RANDOMRESETPROB) * sum;\n    // ...\n  }\n}\n-- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8 \n\nlooks like that the current pagerank implementation doesn't\nallow you to set the \"personalisation vector\" to anything different\nthan a uniform probability vector. I mean, if the pagerank equation\nin matrix form is\n\np = (1-c) * A * p + c * V\n\nwhere:\n\np is the pagerank vector, N compontents (N is the size of the web)\nc is the probability of jumping to a random page no matter the outlinks\n  from current location\nA is the transition matrix, N-by-N, if you see a random walk on the web\n  as a Markov chain\nV is a N-vector, where V_i is the probability of random-jumping to page i\n\n(side note: I am not normalizing by N, i.e. all probabilities sum up to N\nand not to 1)\n\nwell, given all of this, in the current implementation of GraphChi pagerank\nV is a uniform probability vectory = [1, 1, 1, ..., 1].\nA jump to every page is equally likely to happen, no matter the page.\n\nAfter this wall of text I come to my point:\n\ncould a non trivial \"personalisation vector\" be implemented?\nI'd like to be able to set V myself.\n\nIs this in the priorities of the GraphChi team?\n\nCheers,\n```\n\nOriginal issue reported on code.google.com by `g.gherdo...@gmail.com` on 12 Feb 2013 at 10:20"}}