Calibrate your algorithms with Random Walk

When you are designing any algorithm that inside needs a series of numeric parameters that are open to tuning, the random-walk algorithm is an excellent way to refine your algorithm and improve accuracy.

I made a small project in PHP that provides you the ability to generate numeric parameters and create series of iterations o improve them

The basic functionality is splitting 100 points in N parts. For instance, 100 points in 4 parts would be [25, 25, 25, 25]. From this point, you would do random iterations such as [20, 30, 25, 25] or [25, 25, 30, 20] in order to find numeric combinations that would outperform your current accuracy. When an outperforming combination is found, you call to reinforce() method to save it and use it for the next iteration. As more iterations you have, your numeric combination will be more exact against your gold standard. Just try to have a good training set and avoid over-fitting and you are good to go.

This algorithm is the same I used in my master thesis to refine the weights on the SentiWordNet dictionary and the results were quite good.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s