Blog Archives

N armed bandit simulation

August 2, 2013
By

As i learn more and more about machine learning and AI algorithms in general, i came across this book by Sutton & Barto, which is all about reinforcement learning. As i read through the action-value topic, it seemed a nice R-challenge, so here's the complete code: To test one greedy player and two epsilon...

Read more »

Combinatorial optimization with gaoptim package

May 27, 2013
By

My recent update of gaoptim package brings up a new function, GAPerm, which can be used to perform combinatorial optimization using the Genetic Algorithm approach. The example below solves a TSP instance with 10 points around a circumference, the...

Read more »

Geometric Random graphs

March 18, 2013
By

Some days ago a friend of mine asked how much i knew about graph-theory. My answer: nothing. Anyway, i was able to read a little bit on Random Geometric graphs, so i came with this little function to help visualize these things: There are some pretty...

Read more »

Pareto plot with ggplot2

February 23, 2013
By

A Pareto chart, named after Vilfredo Pareto, is a type of chart that contains both bars and a line graph, where individual values are represented in descending order by bars, and the cumulative total is represented by the line (quoted from Wikipedia). ...

Read more »

El Nino and ggplot2

January 21, 2013
By

Some days ago i've got stucked in what appears to be a simple task: read some El Nino data, and then plot it. The problem was the data file format, which you can find here: El Nino Data. There's a mix between 'white space' and '.' characters, so read....

Read more »

Pacific Decadal Oscillation and Brazilian Hydroelectricity generation

January 4, 2013
By

In this post i want to introduce you to the so called Pacific Decadal Oscillation, or PDO for short. Just to give a short introduction to this huge (and complex) subject, the text below follows straight from Wikipedia. ...The PDO is a pattern of Pacif...

Read more »

Genetic Algorithms with gaoptim package

January 2, 2013
By

Two days ago i just submitted my first R package: gaoptim. For my surprise, the next day it was already living on CRAN. In this post i want to show you how to use gaoptim to perform a simple function maximization. This same task could be accomplished ...

Read more »