cover-img

Simulation of random walk using machine learning.

18 October, 2020

14

14

0

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.
img

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.
img

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.
img

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.
img

confusion matrix

14

14

0

Tony Nguyen

San Jose, CA, USA

Bachelor of Science, Physics(Dec 2019) from University of California Merced. Interested in mathematical modeling and data science. Have strong background in differential equations, statistical mechanics, Python, Java,SQL, R.

More Articles

Showwcase is a professional tech network with over 0 users from over 150 countries. We assist tech professionals in showcasing their unique skills through dedicated profiles and connect them with top global companies for career opportunities.

© Copyright 2025. Showcase Creators Inc. All rights reserved.