SlideShare a Scribd company logo
1 of 36
Random Walks
Shuai Zhang, UNSW
cheungshuai@outlook.com
What is
Random Walk?
A drunk man will find his
way home, but a drunk
bird may get lost forever.
What is Random Walk?
• Random walk is a process, a model or a rule to generate path
sequence of random motion.
• A random walk is a mathematical object, known as a stochastic or
random process, that describes a path that consists of a succession of
random steps on some mathematical space such as the integers.
What is Random Walk?
• Many natural phenomena can be modelled as random walk
• the path traced by a molecule as it travels in a liquid or a gas,
• the search path of a foraging animal,
• the price of a fluctuating stock and
• the financial status of a gambler
• PageRank
• Recommender Systems
• Investment theory of stock market
• Generate fractal images
• Even though they may not be truly random in reality
Simulation of Normally Distributed Random
Walk
• We start with initial location 100 and generate the random walk
based on normal probability distribution.
Simulation on Higher Dimensions
• In higher dimensions, the set of randomly walked points has
interesting geometric properties. In fact, one gets a discrete fractal.
Simulation on
Higher
Dimensions
Simple random walks on graphs
Let G=(V, E) be a connected graph, |V|=n and |E|=m
• Given an initial vertex 𝑣0, select “at random” an adjacent vertex 𝑣1,
and move to this neighbour
• Then select “at random” a neighbour 𝑣2 of 𝑣1, and move to it.
• etc.
Simple random walks on graphs
The sequence of vertices 𝑣0, 𝑣1, 𝑣2, … , 𝑣 𝑘, … selected in this way is a
simple random walk on G.
At each step 𝑘, we have a random variable 𝑋 𝑘 taking values on 𝑉.
Hence, the random sequence
𝑋0, 𝑋1, 𝑋2, … , 𝑋 𝑘, …
Is a discrete time stochastic process defined on the state space 𝑉.
Simple random walks on graphs
What does “at random” mean?
If at time 𝑘 we are at vertex 𝑖, choose uniformly an adjacent vertex 𝑗 to
move to.
Let d(i) denote the degree of vertex i.
These transition
probabilities do
not depend on
“time” 𝑘
Simple random walks on graphs
Random Walk and Markov chain
Correspondence between terminology of random walks and Markov chains
Random Walk and Markov chain
• The Markov property holds: conditional on the present, the future is
independent of the past
• The random sequence of vertices visited by the walk,
𝑋0, 𝑋1, 𝑋2, … , 𝑋 𝑘, …
• Is a Markov chain with state space V and matrix of transition
probabilities
𝑃 = 𝑝𝑖𝑗 𝑖, 𝑗 ∈ 𝑉
Random Walk and Markov chain
• A Markov chain describes a stochastic process over a set of states
according to a transition probability matrix
• Markov chains are memoryless
• Random walks correspond to Markov chains:
• The set of states is the set of nodes in the graph.
• The elements of the transition probability matrix are the probabilities to
follow and edge from one node to another.
Random Walk and Markov chain
Stochastic matrix
Random Walk and Markov chain
𝑗∈𝑉
𝑝𝑖𝑗 = 1
Let D be the diagonal matrix with 𝐷 𝑖𝑗 = 1/𝑑(𝑖) and A be the
adjacency matrix of G. Then
P = DA
In particular , if G is d-regular,
𝑃 =
1
𝑑
𝐴
Random Walk and Markov chain
Let 𝜌 𝑘 be the row vector giving the probability distribution of 𝑋 𝑘,
𝜌 𝑘 𝑖 = 𝑃 𝑋 𝑘 = 𝑖 , 𝑖 ∈ 𝑉
The rule of the walk is expressed by the simple equation
𝜌 𝑘+1 = 𝜌 𝑘 𝑃
That is, if 𝜌0 is the initial distribution from which the starting vertex 𝑣0
is drawn,
𝜌 𝑘 = 𝜌0 𝑃 𝑘, 𝑘 ≥ 0
Random Walk and Markov chain
• Since G is connected, the random walk on G corresponds to an
irreducible Markov chain.
Irreducible: There is a path from every node to every other node.
• The Perron-Frobenius theorem for nonnegative matrices implies the
existence of a unique probability distribution π, which is a positive
left eigenvector of P associated to its dominant eigenvalue λ = 1
Random Walk and Markov chain
If the initial vertex of the walk is drawn from 𝜋 , then the probability
distribution at time k is
𝜌 𝑘 = 𝜋𝑃 𝑘
= π
Hence, for all time k >=0 ,
𝑃 𝑋 𝑘 = 𝑖 = 𝜋 𝑖 , 𝑖 ∈ 𝑉
The random walk is a stationary stochastic process
𝜋 is the
stationary
distribution
Random Walk and Markov chain
Does a stationary distribution always exist? Is it unique?
Yes, if the graph is “well-behaved”.
Irreducible and Aperiodic, a directed graph is said to be aperiodic if
there is no integer k > 1 that divides the length of every cycle of the
graph
Several concepts
How fast will the random surfer approach this stationary distribution?
Mixing Time!
The access time or hitting time H(i,j) is the expected number of step before
node j is visited, starting from node i. In general
𝐻 𝑖, 𝑗 ≠ 𝐻 𝑗, 𝑖
The commute time is
𝐻 𝑖, 𝑗 + 𝐻 𝑗, 𝑖
The cover time (starting from a given distribution) is the expected number of
steps to reach every node.
Random Walk with Recommender Systems
A
B
C
D
a
b
c
d
e
Random Walk with Recommender Systems
A
B
C
D
a
b
c
d
e
A to c
Random Walk with Recommender Systems
A
B
C
D
a
b
c
d
e
A to e
A
B
C
b
c
d
e
a
D
Random Walk for Recommendation
TrustWalker: A Random Walk Model for Combining Trust-based and
Item-based Recommendation
Random Walk algorithms
Random Walk algorithms
A subset of Vc of a set genes V have “a prori” known property C
Can we rank the other genes in the set VVc w.r.t their likelihood to
belong to Vc?
Random Walk in DeepWalk
DeepWalk, learning latent representations of vertices in a network
Random Walk in DeepWalk
DeepWalk, learning latent representations of vertices in a network
Reference
• http://people.revoledu.com/kardi/tutorial/StochasticProcess/Rando
mWalk/index.html
• http://www.mit.edu/~kardar/teaching/projects/chemotaxis(AndreaS
chmidt)/random.htm
• https://www.math.uchicago.edu/~lawler/srwbook.pdf
• https://www.cs.cmu.edu/~avrim/598/chap5only.pdf
• http://www.lirmm.fr/~sau/JCALM/Josep.pdf
• http://homes.di.unimi.it/valentini/MB201213/slide/RandomWalksGr
aphs.pdf
• https://arxiv.org/pdf/1403.6652.pdf
Weekly Report
• Released the DeepRec
• Revised the sequential recommendation paper
• I implemented a similar idea for rating prediction-> does not work
• Prepare for the learning group
Next Week:
• Some review work
• Revision

More Related Content

What's hot

introduction to probability
introduction to probabilityintroduction to probability
introduction to probabilitylovemucheca
 
The monte carlo method
The monte carlo methodThe monte carlo method
The monte carlo methodSaurabh Sood
 
Bayes rule (Bayes Law)
Bayes rule (Bayes Law)Bayes rule (Bayes Law)
Bayes rule (Bayes Law)Tish997
 
Single Layer Rosenblatt Perceptron
Single Layer Rosenblatt PerceptronSingle Layer Rosenblatt Perceptron
Single Layer Rosenblatt PerceptronAndriyOleksiuk
 
Probability Theory
Probability TheoryProbability Theory
Probability TheoryParul Singh
 
Monte Carlo Statistical Methods
Monte Carlo Statistical MethodsMonte Carlo Statistical Methods
Monte Carlo Statistical MethodsChristian Robert
 
Probability Concepts Applications
Probability Concepts  ApplicationsProbability Concepts  Applications
Probability Concepts Applicationsguest44b78
 
Machine Learning - Accuracy and Confusion Matrix
Machine Learning - Accuracy and Confusion MatrixMachine Learning - Accuracy and Confusion Matrix
Machine Learning - Accuracy and Confusion MatrixAndrew Ferlitsch
 
Deterministic vs stochastic
Deterministic vs stochasticDeterministic vs stochastic
Deterministic vs stochasticsohail40
 
Properties of estimators (blue)
Properties of estimators (blue)Properties of estimators (blue)
Properties of estimators (blue)Kshitiz Gupta
 
Presentation on inverse matrix
Presentation on inverse matrixPresentation on inverse matrix
Presentation on inverse matrixSyed Ahmed Zaki
 
Transformation of Random variables & noise concepts
Transformation of Random variables & noise concepts Transformation of Random variables & noise concepts
Transformation of Random variables & noise concepts Darshan Bhatt
 

What's hot (20)

introduction to probability
introduction to probabilityintroduction to probability
introduction to probability
 
The monte carlo method
The monte carlo methodThe monte carlo method
The monte carlo method
 
Timeseries forecasting
Timeseries forecastingTimeseries forecasting
Timeseries forecasting
 
Bayes rule (Bayes Law)
Bayes rule (Bayes Law)Bayes rule (Bayes Law)
Bayes rule (Bayes Law)
 
Markov Chains
Markov ChainsMarkov Chains
Markov Chains
 
Markov chain-model
Markov chain-modelMarkov chain-model
Markov chain-model
 
Single Layer Rosenblatt Perceptron
Single Layer Rosenblatt PerceptronSingle Layer Rosenblatt Perceptron
Single Layer Rosenblatt Perceptron
 
Pca ppt
Pca pptPca ppt
Pca ppt
 
Probability Theory
Probability TheoryProbability Theory
Probability Theory
 
Monte Carlo Statistical Methods
Monte Carlo Statistical MethodsMonte Carlo Statistical Methods
Monte Carlo Statistical Methods
 
Probability Concepts Applications
Probability Concepts  ApplicationsProbability Concepts  Applications
Probability Concepts Applications
 
Probability
ProbabilityProbability
Probability
 
Group Theory
Group TheoryGroup Theory
Group Theory
 
Machine Learning - Accuracy and Confusion Matrix
Machine Learning - Accuracy and Confusion MatrixMachine Learning - Accuracy and Confusion Matrix
Machine Learning - Accuracy and Confusion Matrix
 
LINER SURFACE AND VOLUM INTERGRALS Karishma mansuri
LINER SURFACE AND VOLUM INTERGRALS Karishma mansuriLINER SURFACE AND VOLUM INTERGRALS Karishma mansuri
LINER SURFACE AND VOLUM INTERGRALS Karishma mansuri
 
Deterministic vs stochastic
Deterministic vs stochasticDeterministic vs stochastic
Deterministic vs stochastic
 
Properties of estimators (blue)
Properties of estimators (blue)Properties of estimators (blue)
Properties of estimators (blue)
 
Presentation on inverse matrix
Presentation on inverse matrixPresentation on inverse matrix
Presentation on inverse matrix
 
Clustering
ClusteringClustering
Clustering
 
Transformation of Random variables & noise concepts
Transformation of Random variables & noise concepts Transformation of Random variables & noise concepts
Transformation of Random variables & noise concepts
 

Similar to Introduction to Random Walk

randomwalks_states_figures_events_happenings.ppt
randomwalks_states_figures_events_happenings.pptrandomwalks_states_figures_events_happenings.ppt
randomwalks_states_figures_events_happenings.pptVGaneshKarthikeyan
 
Pavan rmc14quantumwalks
Pavan rmc14quantumwalksPavan rmc14quantumwalks
Pavan rmc14quantumwalksPavan Iyengar
 
Spacey random walks CAM Colloquium
Spacey random walks CAM ColloquiumSpacey random walks CAM Colloquium
Spacey random walks CAM ColloquiumAustin Benson
 
ANT COLONY OPTIMIZATION FOR IMAGE EDGE DETECTION
ANT COLONY OPTIMIZATION FOR IMAGE EDGE DETECTIONANT COLONY OPTIMIZATION FOR IMAGE EDGE DETECTION
ANT COLONY OPTIMIZATION FOR IMAGE EDGE DETECTIONHimanshu Srivastava
 
Bayesian Neural Networks
Bayesian Neural NetworksBayesian Neural Networks
Bayesian Neural NetworksNatan Katz
 
Markov chain intro
Markov chain introMarkov chain intro
Markov chain intro2vikasdubey
 
Financial Networks III. Centrality and Systemic Importance
Financial Networks III. Centrality and Systemic ImportanceFinancial Networks III. Centrality and Systemic Importance
Financial Networks III. Centrality and Systemic ImportanceKimmo Soramaki
 
Geometry of Continuous Time Markov Chains
Geometry of Continuous Time Markov ChainsGeometry of Continuous Time Markov Chains
Geometry of Continuous Time Markov ChainsShuchang Zhang
 
Probabilistic Models of Time Series and Sequences
Probabilistic Models of Time Series and SequencesProbabilistic Models of Time Series and Sequences
Probabilistic Models of Time Series and SequencesZitao Liu
 
Page rank - from theory to application
Page rank - from theory to applicationPage rank - from theory to application
Page rank - from theory to applicationGAYO3
 
Intro to Quant Trading Strategies (Lecture 2 of 10)
Intro to Quant Trading Strategies (Lecture 2 of 10)Intro to Quant Trading Strategies (Lecture 2 of 10)
Intro to Quant Trading Strategies (Lecture 2 of 10)Adrian Aley
 
Statistical Description of Turbulent Flow
Statistical Description of Turbulent FlowStatistical Description of Turbulent Flow
Statistical Description of Turbulent FlowKhusro Kamaluddin
 
Multi Object Filtering Multi Target Tracking
Multi Object Filtering Multi Target TrackingMulti Object Filtering Multi Target Tracking
Multi Object Filtering Multi Target TrackingEngin Gul
 

Similar to Introduction to Random Walk (20)

randomwalks_states_figures_events_happenings.ppt
randomwalks_states_figures_events_happenings.pptrandomwalks_states_figures_events_happenings.ppt
randomwalks_states_figures_events_happenings.ppt
 
Statistics (recap)
Statistics (recap)Statistics (recap)
Statistics (recap)
 
1. Random walk.pdf
1. Random walk.pdf1. Random walk.pdf
1. Random walk.pdf
 
Pavan rmc14quantumwalks
Pavan rmc14quantumwalksPavan rmc14quantumwalks
Pavan rmc14quantumwalks
 
Spacey random walks CAM Colloquium
Spacey random walks CAM ColloquiumSpacey random walks CAM Colloquium
Spacey random walks CAM Colloquium
 
ANT COLONY OPTIMIZATION FOR IMAGE EDGE DETECTION
ANT COLONY OPTIMIZATION FOR IMAGE EDGE DETECTIONANT COLONY OPTIMIZATION FOR IMAGE EDGE DETECTION
ANT COLONY OPTIMIZATION FOR IMAGE EDGE DETECTION
 
Bayesian Neural Networks
Bayesian Neural NetworksBayesian Neural Networks
Bayesian Neural Networks
 
Random walk on Graphs
Random walk on GraphsRandom walk on Graphs
Random walk on Graphs
 
Markov chain intro
Markov chain introMarkov chain intro
Markov chain intro
 
Financial Networks III. Centrality and Systemic Importance
Financial Networks III. Centrality and Systemic ImportanceFinancial Networks III. Centrality and Systemic Importance
Financial Networks III. Centrality and Systemic Importance
 
Markov Chain Basic
Markov Chain BasicMarkov Chain Basic
Markov Chain Basic
 
Av 738- Adaptive Filtering - Background Material
Av 738- Adaptive Filtering - Background MaterialAv 738- Adaptive Filtering - Background Material
Av 738- Adaptive Filtering - Background Material
 
Geometry of Continuous Time Markov Chains
Geometry of Continuous Time Markov ChainsGeometry of Continuous Time Markov Chains
Geometry of Continuous Time Markov Chains
 
Probabilistic Models of Time Series and Sequences
Probabilistic Models of Time Series and SequencesProbabilistic Models of Time Series and Sequences
Probabilistic Models of Time Series and Sequences
 
Page rank - from theory to application
Page rank - from theory to applicationPage rank - from theory to application
Page rank - from theory to application
 
Intro to Quant Trading Strategies (Lecture 2 of 10)
Intro to Quant Trading Strategies (Lecture 2 of 10)Intro to Quant Trading Strategies (Lecture 2 of 10)
Intro to Quant Trading Strategies (Lecture 2 of 10)
 
Data Mining Lecture_12.pptx
Data Mining Lecture_12.pptxData Mining Lecture_12.pptx
Data Mining Lecture_12.pptx
 
Statistical Description of Turbulent Flow
Statistical Description of Turbulent FlowStatistical Description of Turbulent Flow
Statistical Description of Turbulent Flow
 
Cartesian co.ordinates
Cartesian co.ordinatesCartesian co.ordinates
Cartesian co.ordinates
 
Multi Object Filtering Multi Target Tracking
Multi Object Filtering Multi Target TrackingMulti Object Filtering Multi Target Tracking
Multi Object Filtering Multi Target Tracking
 

More from Shuai Zhang

Learning group variational inference
Learning group  variational inferenceLearning group  variational inference
Learning group variational inferenceShuai Zhang
 
Reading group nfm - 20170312
Reading group  nfm - 20170312Reading group  nfm - 20170312
Reading group nfm - 20170312Shuai Zhang
 
Talk@rmit 09112017
Talk@rmit 09112017Talk@rmit 09112017
Talk@rmit 09112017Shuai Zhang
 
Learning group em - 20171025 - copy
Learning group   em - 20171025 - copyLearning group   em - 20171025 - copy
Learning group em - 20171025 - copyShuai Zhang
 
Learning group dssm - 20170605
Learning group   dssm - 20170605Learning group   dssm - 20170605
Learning group dssm - 20170605Shuai Zhang
 
Reading group gan - 20170417
Reading group   gan - 20170417Reading group   gan - 20170417
Reading group gan - 20170417Shuai Zhang
 
Introduction to XGboost
Introduction to XGboostIntroduction to XGboost
Introduction to XGboostShuai Zhang
 
Introduction to CNN
Introduction to CNNIntroduction to CNN
Introduction to CNNShuai Zhang
 

More from Shuai Zhang (8)

Learning group variational inference
Learning group  variational inferenceLearning group  variational inference
Learning group variational inference
 
Reading group nfm - 20170312
Reading group  nfm - 20170312Reading group  nfm - 20170312
Reading group nfm - 20170312
 
Talk@rmit 09112017
Talk@rmit 09112017Talk@rmit 09112017
Talk@rmit 09112017
 
Learning group em - 20171025 - copy
Learning group   em - 20171025 - copyLearning group   em - 20171025 - copy
Learning group em - 20171025 - copy
 
Learning group dssm - 20170605
Learning group   dssm - 20170605Learning group   dssm - 20170605
Learning group dssm - 20170605
 
Reading group gan - 20170417
Reading group   gan - 20170417Reading group   gan - 20170417
Reading group gan - 20170417
 
Introduction to XGboost
Introduction to XGboostIntroduction to XGboost
Introduction to XGboost
 
Introduction to CNN
Introduction to CNNIntroduction to CNN
Introduction to CNN
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 

Recently uploaded (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 

Introduction to Random Walk

  • 1. Random Walks Shuai Zhang, UNSW cheungshuai@outlook.com
  • 2. What is Random Walk? A drunk man will find his way home, but a drunk bird may get lost forever.
  • 3. What is Random Walk? • Random walk is a process, a model or a rule to generate path sequence of random motion. • A random walk is a mathematical object, known as a stochastic or random process, that describes a path that consists of a succession of random steps on some mathematical space such as the integers.
  • 4. What is Random Walk? • Many natural phenomena can be modelled as random walk • the path traced by a molecule as it travels in a liquid or a gas, • the search path of a foraging animal, • the price of a fluctuating stock and • the financial status of a gambler • PageRank • Recommender Systems • Investment theory of stock market • Generate fractal images • Even though they may not be truly random in reality
  • 5. Simulation of Normally Distributed Random Walk • We start with initial location 100 and generate the random walk based on normal probability distribution.
  • 6. Simulation on Higher Dimensions • In higher dimensions, the set of randomly walked points has interesting geometric properties. In fact, one gets a discrete fractal.
  • 8. Simple random walks on graphs Let G=(V, E) be a connected graph, |V|=n and |E|=m • Given an initial vertex 𝑣0, select “at random” an adjacent vertex 𝑣1, and move to this neighbour • Then select “at random” a neighbour 𝑣2 of 𝑣1, and move to it. • etc.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. Simple random walks on graphs The sequence of vertices 𝑣0, 𝑣1, 𝑣2, … , 𝑣 𝑘, … selected in this way is a simple random walk on G. At each step 𝑘, we have a random variable 𝑋 𝑘 taking values on 𝑉. Hence, the random sequence 𝑋0, 𝑋1, 𝑋2, … , 𝑋 𝑘, … Is a discrete time stochastic process defined on the state space 𝑉.
  • 15. Simple random walks on graphs What does “at random” mean? If at time 𝑘 we are at vertex 𝑖, choose uniformly an adjacent vertex 𝑗 to move to. Let d(i) denote the degree of vertex i. These transition probabilities do not depend on “time” 𝑘
  • 16. Simple random walks on graphs
  • 17. Random Walk and Markov chain Correspondence between terminology of random walks and Markov chains
  • 18. Random Walk and Markov chain • The Markov property holds: conditional on the present, the future is independent of the past • The random sequence of vertices visited by the walk, 𝑋0, 𝑋1, 𝑋2, … , 𝑋 𝑘, … • Is a Markov chain with state space V and matrix of transition probabilities 𝑃 = 𝑝𝑖𝑗 𝑖, 𝑗 ∈ 𝑉
  • 19. Random Walk and Markov chain • A Markov chain describes a stochastic process over a set of states according to a transition probability matrix • Markov chains are memoryless • Random walks correspond to Markov chains: • The set of states is the set of nodes in the graph. • The elements of the transition probability matrix are the probabilities to follow and edge from one node to another.
  • 20. Random Walk and Markov chain Stochastic matrix
  • 21. Random Walk and Markov chain 𝑗∈𝑉 𝑝𝑖𝑗 = 1 Let D be the diagonal matrix with 𝐷 𝑖𝑗 = 1/𝑑(𝑖) and A be the adjacency matrix of G. Then P = DA In particular , if G is d-regular, 𝑃 = 1 𝑑 𝐴
  • 22. Random Walk and Markov chain Let 𝜌 𝑘 be the row vector giving the probability distribution of 𝑋 𝑘, 𝜌 𝑘 𝑖 = 𝑃 𝑋 𝑘 = 𝑖 , 𝑖 ∈ 𝑉 The rule of the walk is expressed by the simple equation 𝜌 𝑘+1 = 𝜌 𝑘 𝑃 That is, if 𝜌0 is the initial distribution from which the starting vertex 𝑣0 is drawn, 𝜌 𝑘 = 𝜌0 𝑃 𝑘, 𝑘 ≥ 0
  • 23. Random Walk and Markov chain • Since G is connected, the random walk on G corresponds to an irreducible Markov chain. Irreducible: There is a path from every node to every other node. • The Perron-Frobenius theorem for nonnegative matrices implies the existence of a unique probability distribution π, which is a positive left eigenvector of P associated to its dominant eigenvalue λ = 1
  • 24. Random Walk and Markov chain If the initial vertex of the walk is drawn from 𝜋 , then the probability distribution at time k is 𝜌 𝑘 = 𝜋𝑃 𝑘 = π Hence, for all time k >=0 , 𝑃 𝑋 𝑘 = 𝑖 = 𝜋 𝑖 , 𝑖 ∈ 𝑉 The random walk is a stationary stochastic process 𝜋 is the stationary distribution
  • 25. Random Walk and Markov chain Does a stationary distribution always exist? Is it unique? Yes, if the graph is “well-behaved”. Irreducible and Aperiodic, a directed graph is said to be aperiodic if there is no integer k > 1 that divides the length of every cycle of the graph
  • 26. Several concepts How fast will the random surfer approach this stationary distribution? Mixing Time! The access time or hitting time H(i,j) is the expected number of step before node j is visited, starting from node i. In general 𝐻 𝑖, 𝑗 ≠ 𝐻 𝑗, 𝑖 The commute time is 𝐻 𝑖, 𝑗 + 𝐻 𝑗, 𝑖 The cover time (starting from a given distribution) is the expected number of steps to reach every node.
  • 27. Random Walk with Recommender Systems A B C D a b c d e
  • 28. Random Walk with Recommender Systems A B C D a b c d e A to c
  • 29. Random Walk with Recommender Systems A B C D a b c d e A to e A B C b c d e a D
  • 30. Random Walk for Recommendation TrustWalker: A Random Walk Model for Combining Trust-based and Item-based Recommendation
  • 32. Random Walk algorithms A subset of Vc of a set genes V have “a prori” known property C Can we rank the other genes in the set VVc w.r.t their likelihood to belong to Vc?
  • 33. Random Walk in DeepWalk DeepWalk, learning latent representations of vertices in a network
  • 34. Random Walk in DeepWalk DeepWalk, learning latent representations of vertices in a network
  • 35. Reference • http://people.revoledu.com/kardi/tutorial/StochasticProcess/Rando mWalk/index.html • http://www.mit.edu/~kardar/teaching/projects/chemotaxis(AndreaS chmidt)/random.htm • https://www.math.uchicago.edu/~lawler/srwbook.pdf • https://www.cs.cmu.edu/~avrim/598/chap5only.pdf • http://www.lirmm.fr/~sau/JCALM/Josep.pdf • http://homes.di.unimi.it/valentini/MB201213/slide/RandomWalksGr aphs.pdf • https://arxiv.org/pdf/1403.6652.pdf
  • 36. Weekly Report • Released the DeepRec • Revised the sequential recommendation paper • I implemented a similar idea for rating prediction-> does not work • Prepare for the learning group Next Week: • Some review work • Revision

Editor's Notes

  1. can all be approximated by random walk models, even though they may not be truly random in reality.
  2. can all be approximated by random walk models, even though they may not be truly random in reality.
  3. a regular graph is a graph where each vertex has the same number of neighbors
  4. a regular graph is a graph where each vertex has the same number of neighbors
  5. a regular graph is a graph where each vertex has the same number of neighbors
  6. a regular graph is a graph where each vertex has the same number of neighbors
  7. a regular graph is a graph where each vertex has the same number of neighbors
  8. a regular graph is a graph where each vertex has the same number of neighbors
  9. a regular graph is a graph where each vertex has the same number of neighbors
  10. a regular graph is a graph where each vertex has the same number of neighbors
  11. a regular graph is a graph where each vertex has the same number of neighbors
  12. a regular graph is a graph where each vertex has the same number of neighbors