Latest Entries

Make a poster with LaTeX

I had to prepare a poster for the oncoming EGU (European Geosciences Union) meeting that will be held in Wien the next week. Instead of using a Microsoft product like Powerpoint or Publisher, like I did the last time that I made a poster, I decided to use LaTeX. A friend suggested me baposter class (link) and it was very easy. Into the downloaded archive there are several examples, I chose one of them, I did some changes and that’s the result:

P.S. The documentation seems a little bit oudated, so read carefully the homepage for the changelog. E.g. if you want a shaded background you have to use shadetb (or shadelr) instead of shade-tb (shade-lr) as specified in the documentation.

Stack-exchange

The well-known StackExchange network has recently added a new forum about Computational Science at http://scicomp.stackexchange.com/. After the very useful one about Statistical Analysis (here) and the original one about programming (here), I’m quite sure that this one about computational science will become vital for all the people working on computer simulations and algorithms.

Author Wordle by Scopus

Obtained with the Author Wordle just introduced by SciVerse Scopus.

M5 method and MATLAB

I’ve been using M5 method for creating regression trees for a while implemented in WEKA when google suggested me the MATLAB version. It seems quite good and you can find it here.

Complex Networks analysis software and MATLAB

If you are interested in complex networks there are some nice libraries to perform analysis, algorithms and nice plotting. At first, I’d suggest Python networkx library, but if you prefer MATLAB the choice must be MatlabBGL a nice toolbox with some useful functions and some simple algorithms. But if you have a 64-bit Apple computer you’ll get crazy trying to install the last release (4.0) of this toolbox because there is a dependency with boost c++ libraries but the last version changed the interface and nothing compiles etc etc. You have two possibilities: try to cope with all this mess installing older version of libraries, changing makefiles and configuration files or, probably better, get the precompiled binaries from here.

Forecasting with Genetic Programming (in Python)

In the last months I’ve been investigating various methodologies to perform an effective forecasting, especially for energy demand time series. Given the various talks about Genetic Programming I attended in the last Evo* conferences (EUROGP conference is among them), I wanted to implement a forecasting method using Genetic Programming and my first choice was pyevolve framework, an amazing simple and powerful (and updated!) library for Evolutionary Computation written in Python.

I was surprised that the first (working) implementation came out only after twenty minutes, using the simple tutorial the author Christian Perone provides in his blog.

Everything starts in this way:

from pyevolve import *
import pylab
import math

Then you define a main function, where I put the data load routine from a .csv file

def main_run():
# Load data from file.csv
myReader = csv.reader(open('filename.csv', 'rb'), delimiter = ',')
for row in myReader:
    # do something

Then with the following simple lines you define a classical GP program setting the maximum trees depth and selecting the fitness function (eval_func in this case):

genome = GTree.GTreeGP()
genome.setParams(max_depth=3, method="ramped")
genome.evaluator.set(eval_func)
ga = GSimpleGA.GSimpleGA(genome)

Then there is the most important part, the definition of terminals and functions:

ga.setParams(gp_terminals = ['x1', 'x2','x3','x4','x5','x6','x7''ephemeral:random.random()'], gp_function_prefix = "gp")

Here I defined ‘x1‘ … ‘x7‘ as x(t-1) \ldots x(t-7) , thus I added a constant, a random float between 0 and 1 (you can use any kind of random function within random python package). For the functions is very easy, all the python functions whose name is starting with the specified prefix are considered GP functions (in my case I have gp_add, gp_mul and so on for other arithmetic operators).

Now you can end with the last settings:

ga.setMinimax(Consts.minimaxType["minimize"])
ga.setGenerations(1000)
ga.setMutationRate(0.08)
ga.setCrossoverRate(0.1)
ga.setPopulationSize(2000)
ga.evolve(freq_stats=5)
best = ga.bestIndividual()
best.writeDotImage("tree_pi.jpg")
print best

where you set evolutionary parameters (crossover, mutation etc), statistics console outputs, the plot of the best individuals and also the output to a png file of the tree of the best individual.

Now you can define the GP functions that as stated above whose name starts with ‘gp’:

def gp_add(a, b): return a+b
def gp_sub(a, b): return a-b
def gp_mul(a, b): return a*b

And finally the fitness function:

def eval_func(chromosome):
code_comp = chromosome.getCompiledCode()
err = 0;
for i in xrange(8, len(target)-1):
x1 = target[i-1]
x2 = target[i-2]
# ...
x7 = target[i-7]
 
evaluated     = eval(code_comp)
err += (target[i] - evaluated)
 
return (abs(err))

Here you set as error function the sum of the absolute prediction errors, you ‘compile’ the GP tree as python code and then for all the time series samples (that I defined as a list surprisingly called target) the for loop evaluates the error between target value and obtained value computing in the end the error.

At this point you can run your code and, et voilà, you obtain a predictor for your forecasting problem. Now you can really start to do research getting an accurate predictor tuning the algorithm parameters, selecting the right variables and constant as the GP functions. To get more information about pyevolve check also the specific Google group.

 

ThRaSH Workshop

Despite the name, ThRaSH workshop is a brilliant event, especially now when the genuine workshops are disappearing. Next July, just before GECCO conference, in Copenhagen will be held the fifth edition of the Workshop on Theory of Randomized Search Heuristics. All the European experts on combinatorial and continuous optimization will be together to discuss the recent ideas on Evolutionary Computation (and not only). Check the website for the important dates, organization, program (tutorial and keynotes) and news.

PPSN 2012

Are you looking for the best conference in evolutionary computation and nature computing? PPSN, International Conference on Parallel Problem Solving From Nature, is probably the answer. This conference, which will be held in Taormina (Italy, check the conf website for some nice pictures) in September 2012, has the peculiarity of having only poster sessions to make the discussion about the proposed works more intense (and effective) than usual conference talks.

I think that famous conferences (like IEEE ones and GECCO) are becoming just a way to be seen and publish works which otherwise would need at least one year to be published on computer science journals, but the possibility of meet potential collaborators is getting smaller, because these conferences are huge (>600 participants!) with a massive amount of parallel sessions (the last IEEE SSCI I attended started at 8.30 in the morning and there were each day 6-8 parallel sessions, see the conference schedule…). Check the PPSN 2012 website to know the publication deadlines and getting other important information.

Read the interesting editorial appeared on the Communications of ACM with the title “Where have all the workshops gone?” about the workshops disappear (and the north american Dagschull Envy!).

IEEE SSCI Talk

This is the talk I gave this morning at the IEEE Symposium on Computational Intelligence Applications in Smart Grid in Paris. People was interested in the possibility to improve the results of neural networks also with a simple averaging. The other talks were quite interesting, if you are involved in forecasting and monitoring I suggest you to check IEEEXPLORE in the next weeks.

Multi-Criteria Decision Making: some notes

I’m attending in Paris the IEEE Symposium Series on Computational Intelligence 2011, and the program is full of interesting talks. Piero Bonissone, from the GE Global Research, gave a two hours tutorial on Multi-Criteria Decision Making (MCDM), explaining the main theories and presenting three real-world cases.

The main problem for MCDM is the necessity of cope with more criteria when ordering and classifying. One possibility is to use all the Pareto theory and apply some algorithms, like Evolutionary Algorithms: niching ones (NPGA, NSGA) or elitist micro-GA and PAES. However, you can try to aggregate the criteria with a linear combination or with a \epsilon-constraint approach: only one objective is optimized and the other ones are used as constraints, as:

\mathrm{min} f_i(x), \quad f_j(x) \le \epsilon_j

Continue reading…



Copyright © 2004–2009. All rights reserved.

RSS Feed. This blog is proudly powered by Wordpress and uses Modern Clix, a theme by Rodrigo Galindez.