Simulation of random walk using machine learning.
18 October, 2020
14
14
0
Contributors
This is an undergraduate research thesis on designing two random walk models then applying supervised machine learning specifically logistic regression to classify the two random walk models.
I'll discuss a bit on the project and the rest can be read on the link. To start we will need to build a random walk model so I will explain what is a random walk. A random walk is modeling the path of a particle or object that is random an example of this would be the popular drunken walk man. To build the random walk model you will need to import the followings: numpy,mathplotlib,sci-kit learn, pandas, and seaborn. The simulation we will be basing this random walk is on the coin flip: if I toss a coin and it lands head I take a step to the right if tails walk to the left.
Fair random walk
This will be the concept for the standard or fair random walk. We can now introduce a special random walk. This special one will alternate every move so for ex: flipping a coin and it lands head I take a step to the right, tails to the left, toss again heads now take a step to the left, tails to the right. Here's an idea of the alternating random walk.
Alternating random walk
From here we will design a code that explains how to generate the two random walks. Since this is a coin flip idea, we can use uniform distribution to represent this and on bottom is one of the plots.
Varience over time
After generating the models we then build a logistic classifier to classify the two random walk. The link will show the code, but what this shows is that the computer predicted 308 as special right and 185 standard right.
confusion matrix