HeuristicLab YouTube Channel
Because of multiple user requests and our continuous quest to improve documentation we have sat together last week and recorded some video tutorials which cover various parts of HeuristicLab.
So far we have created 4 video tutorials:
How to Execute Algorithms in HeuristicLab
The video shows how you can parameterize and execute algorithms in HeuristicLab:
HeuristicLab Usability and Views
This video demonstrates the basic user interface concepts of HeuristicLab and how to effectively use them:
Experiment Design and Analysis in HeuristicLab
This video shows how to create experiments and batch-runs in HeuristicLab as well as how to analyze the generated results:
How to create Custom Algorithms in HeuristicLab
This video shows how algorithms in HeuristicLab can be adapted in the GUI by extending a Genetic Algorithm to incorporate a crossover probability:
Additionally we have also created a video which gives a quick overview of HeuristicLab's most important features:
You can watch the videos here or head over to our new HeuristicLab YouTube channel. Let us know what you think and don't forget to Like our videos!
New Feature: Embedded Benchmark Problem Instances
I wanted to share a feature that we have included into our trunk yesterday and which will be part of the next release. It was our intention to aid people in benchmarking their algorithms. Usually in the literature a number of benchmark problem instances are known and shared. These instances allow to directly compare the performance of two algorithms. We have now included some of these benchmark libraries as plugins and make them directly available with HeuristicLab. Currently we have included TSPLIB, QAPLIB, and several others. Each library is a separate plugin that stores the files inside the assembly. It is very easy to add new benchmark libraries, as well as to adapt the problems to use them. A problem can make use of multiple, even different libraries.
We plan to expand this to include even more libraries so that you don't have to search the web for the files, but just load them in HeuristicLab. You can try the feature for yourself if you grab the latest daily build.
Math notation for symbolic models
In February I have a little more time available that I can spend on HeuristicLab development. So I implemented a new view that shows genetic programming solutions for symbolic data analysis problems in conventional math notation. This has been on our wishlist for a long time, however, up to now we didn't see a good way of implementing this. The implementation is not ideal because it relies on the MathJax library (Javascript) to display the models in a webbrowser control. Using the daily build of the trunk version you can try this new feature. I hope you find it useful.
HeuristicLab 3.3.6 Release
Happy new year! The HeuristicLab development team kicked off 2012 with the brand new HeuristicLab 3.3.6 release.
One of the most exciting new features of HeuristicLab 3.3.6 is HeuristicLab Hive which provides an infrastructure for parallel and distributed computing. Hive consists of a server and computation slaves. Users can upload jobs to the Hive server which distributes the jobs among the available slaves. The slaves execute the jobs and send the result back to the server after they are finished. More information about how to install a Hive server and Hive slaves and how to use Hive in general can be found in the Howtos.
Additional new features in HeuristicLab 3.3.6 include:
- Robust Taboo Search for the Quadratic Assignment Problem
- New Standard Algorithms for Regression and Classification (kNN, Neural Networks, Multi-Nominal Logit Regression)
- Genetic Programming Grammar Editor
- New Standard Tree-Creation Operators for Genetic Programming (Grow, Full, Ramped Half-Half)
- RunCollectionModifiers to Combine and Transform Algorithm Results
- Improved Customization and Export of Charts
- Performance Benchmarks
For a full list of all changes in HeuristicLab 3.3.6 have a look at the ChangeLog.
Go to the Download page or click on the image below to get HeuristicLab 3.3.6 now!
HeuristicLab and Linux
Daniel Knittl-Frank is currently working on porting HeuristicLab to Linux/Mono and sent us screenshots of his progress which I wanted to share with you. Daniel has already got a modified version of HeuristicLab running on Ubuntu 11.10 with the git master of Mono. The last addition to his HL version is that charting now also works with Mono. So here is some eyecandy for the Linux users out there showing 3 views for analyzing runs:
Here is the bubble chart view on Linux:
The tabular view:
And the box-plot diagram:
Of course this is work in progress and hasn't yet landed in our subversion repository but will be integrated when we feel it is stable enough.
Large Experiment Design for Programmers
Recently, I've been executing a couple of very large parameter experiments with over a thousand batch runs resulting in more than 27,000 individual runs. I want to share with you how I did that and some things that have to take care of. Unfortunately we don't yet have a graphical designer for this task and so it requires a little bit of programming. However I have prepared a small solution which you can find attached to this post that you can build upon. It's not the experiment that I created, I cannot share that with you, but one that builds on the Genetic Algorithm and the Traveling Salesman Problem. Comments are always welcomed here or in our google group!
The goal of this experiment was to test several parameter configurations on a number of problem instances in order to find the configuration that performed best in those instances. Such an experiment can be created in the Experiment View by hand as well. However all the batch runs and configurations need to be created manually which takes some time.
To start with such a large experiment it is important to prepare a template file in the HeuristicLab optimizer. This template constitutes the algorithm as well as the problem already loaded. For large experiments with a large number of runs it's advised to be very selective of what you show in your results. Memory requirements can quickly grow when you have e.g. charts and a lot of other information in your results. Consider that you create a line chart with 5 rows over 100.000 iterations in your result. The memory requirement for the raw data is about 5*100k*sizeof(double)/1024 = 3.8Mb for the chart alone. This is not so much of a problem for the analysis of a couple of hundred runs, but with several thousand runs this information cannot be traced anymore, or at least not in every iteration. If you absolutely want to have the charts, you can raise the UpdateInterval of the Analyzer parameter.
I excluded the charts by removing all unnecessary analyzers and customized the BestAverageWorstQualityAnalyzer. The last one produces the "Qualities" chart which I didn't need. So I removed the DataTableValuesCollector from the analyzer's operator graph as well as the "Qualities" parameter from the ResultsCollector in this graph. After joining the operator graph again I had an analyzer that would just output the current best, average, and worst qualities which was perfect for me as I just wanted to know on the final result. To further prune the collected values in the runs I visited every parameter and parameter's parameter in the problem and in the algorithm and unchecked the option "Show in run" for all those that I didn't need afterwards. You can see all collected values in the run if you start and stop your algorithm after it has performed some iterations. When you're getting runs that show just what you need you're ready.
When I had the template file, I cleared all runs, the engine log and saved it. I then built a program in which I put all the configurations that I wanted. Here for example I put them in static variables.
static readonly int repetitions = 10; static readonly Dictionary<string, double> instances = new Dictionary<string, double>() { { "berlin52", 7542 }, { "ch130", 6110 }, { "kroA100", 21282 }, { "pcb442", 50778 }, { "tsp225", 3916 } }; static readonly string[] crossovers = new string[] { "CyclicCrossover2", "EdgeRecombinationCrossover", "MaximalPreservativeCrossover", "OrderBasedCrossover", "OrderCrossover2", "PartiallyMatchedCrossover", "UniformLikeCrossover" }; static readonly string[] mutators = new string[] { "InsertionManipulator", "InversionManipulator", "ScrambleManipulator", "Swap2Manipulator", "Swap3Manipulator", "TranslocationInversionManipulator", "TranslocationManipulator" }; static readonly int[] elites = new int[] { 0, 1 }; static readonly double[] mutationProbabilities = new double[] { 0, 0.05, 0.1 }; static readonly string[] selectors = new string[] { "LinearRankSelector", "ProportionalSelector", "TournamentSelector" };
You can calculate the number of configurations by multiplying all the choices. In this example we obtain roughly 4410 configurations (a bit less because a setting of 0% mutation probability doesn't require us to test all the mutation operators). But because a Genetic Algorithm is stochastic we have to repeat testing each configuration a couple of times (e.g. 20) resulting in a total of more than 80,000 individual runs that have to be calculated. I decided that I would split this up into a couple of smaller experiments, so I created a separate experiment for every problem instance and further separated those experiments by configurations with 1-elitism and those that do not use elitism. This left me with about 400 configurations per experiment and a total of 10 experiment files which also could be executed on 10 different machines to speed up processing.
The code for creating the experiment and the configurations is given below. If you're interested to run this, I'd suggest you download the attached Visual Studio 2010 solution. It requires that HeuristicLab 3.3.5 is installed in "C:\Program Files\HeuristicLab 3.3".
static void Main(string[] args) { Console.Write("Loadig template... "); var template = XmlParser.Deserialize<GeneticAlgorithm>("GA TSP Template.hl"); Console.WriteLine("done."); MultiAnalyzer analyzer = (MultiAnalyzer)template.Analyzer.Clone(); string instanceDir = Path.Combine(Environment.CurrentDirectory, "TSPLIB"); foreach (var instance in instances) { var tsp = (TravelingSalesmanProblem)template.Problem; tsp.ImportFromTSPLIB(instanceDir + "\\" + instance.Key + ".tsp", instanceDir + "\\" + instance.Key + ".opt.tour", instance.Value); tsp.DistanceMatrixParameter.Value = null; tsp.Name = instance.Key; template.Analyzer = analyzer; // the analyzer in the template is customized and would otherwise be overwritten foreach (var elite in elites) { var experiment = new Experiment("TSPLIB (" + instance.Key + "), GA (Elites = " + elite.ToString() + ")"); foreach (var crossover in crossovers) { foreach (var selector in selectors) { Console.Write("."); foreach (var mutProb in mutationProbabilities) { if (mutProb > 0) { foreach (var mutator in mutators) { var batchRun = new BatchRun("GA (Elites = " + elite.ToString() + ", Crossover = " + crossover + ", Selector = " + selector + ", Mutator (" + mutProb + ") = " + mutator); batchRun.Repetitions = repetitions; var gaTsp = (GeneticAlgorithm)template.Clone(); gaTsp.Name = batchRun.Name; gaTsp.Elites.Value = elite; gaTsp.Crossover = gaTsp.CrossoverParameter.ValidValues.Single(x => x.Name.Equals(crossover)); gaTsp.Selector = gaTsp.SelectorParameter.ValidValues.Single(x => x.Name.Equals(selector)); gaTsp.MutationProbability.Value = mutProb; gaTsp.Mutator = gaTsp.MutatorParameter.ValidValues.Single(x => x.Name.Equals(mutator)); batchRun.Optimizer = gaTsp; experiment.Optimizers.Add(batchRun); } } else { // no mutation case, similar to above, excluded for brevity } } } } Console.Write(Environment.NewLine + "Saving experiment (Instance = " + instance.Key + ", Elites = " + elite + ")... "); XmlGenerator.Serialize(experiment, string.Format("GA TSP Experiment " + instance.Key + " " + elite + ".hl")); Console.WriteLine("done."); } } }
Each of the 10 experiment files should take about 10Mb disk space, it will take a couple of minutes to generate each of them.
Update on User Interface resizing problem in HeuristicLab
As mentioned in a previous Blog post there are some users who are experiencing problems with the user interface not resizing correctly. With HeuristicLab 3.3.6 there will be an option to switch to other document window styles where this problem doesn't occur. In 3.3.6 you will find an entry "View -> Change MainForm Type" in the menubar. This opens a dialog where you can choose between different MainForm types:
There are 3 types of MainForms which can be used. The Docking MainForm is the standard HeuristicLab user interface where documents are displayed as tab pages:
Additionally there is a Multiple and a Single Document option. The Multiple Document MainForm displays documents as windows within the HeuristicLab main window:
The Single Document MainForm creates for each document an own window which is also shown in the Windows taskbar:
The resizing issue doesn't occur with the Single and Multiple Document styles. This means you can use these different document window styles and don't have to switch to another language or DPI size (see UsersFAQ).
These changes are already in trunk and you can try them out if you are affected by this problem.
User Interface resizing problem in HeuristicLab
On some machines it might happen that controls are not correctly resized and the HeuristicLab GUI looks like this:
This behavior results from a bug in the GUI frameworks (either Windows Forms or the Dock Panel Suite). There are two known causes for this problem. The first one is that the Windows text size is set to a value larger than 100%. To avoid this bug, the Windows text size in the Windows display settings has to be set to 100%. This can be done in the dialog shown below which can be opened from the Windows Control Panel (Control Panel -> Appearance and Personalization -> Display).
The other possible cause for this problem is the "Language for non-Unicode programs" setting of your Windows operating system. There are some languages which we know cause a resizing problem in HeuristicLab, e.g. Latvia. German or English on the other hand work fine. A possible workaround at the moment would be that you switch this setting to German or English. The downside of this is however that applications which don't support Unicode might not display text correctly anymore. The following screen shot shows how you can change the setting:
We are at the moment further investigating the problem and hope to come up with a fix for this bug soon.
Financial Analysis with HeuristicLab
One application that I've been interested in lately is financial analysis.
Recently I've looked at interest rate swaps in more detail. Interest rate swaps are an important financial instrument for controlling risk, but are also used for speculative purposes. Using the genetic programming capabilities of HeuristicLab it is relatively easy to generate a regression model to estimate the interest rate swap yield. The result for the European 10-year interest rate swap (monthly data) in the time span from April 1991 until August 2011 can be seen in the next figure.
In the last section from index 582 onwards (July 2007 - August 2011) the output of the model (red line) deviates very strongly from the actually observed values.
To get a better idea of the underlying relations found by GP it is interesting to study variable impacts. The most important variables for the 10-year European interest rate swap yield found through the genetic programming runs are:
| Most relevant variables | Hold out set |
|---|---|
| US M1, US Mortgage Market Index | March 1991 - April 1995 |
| Eurozone Employment qq, US M1, US Corporate Profits | April 1995 - May 1999 |
| US Corporate Profits, Eurozone Employment qq, US U Michigan Expectations Prelim. | May 1999 - June 2003 |
| US Corporate Profits, Eurozone Employment qq | June 2003 - July 2007 |
| US Existing Home Sales | July 2007 - August 2008 |
Interestingly the most important variables differ for different time spans. Only the corporate profits and the number of employed persons in the Euro zone are detected as relevant over a larger time span.
The following table shows the variable impact calculation results for the first fold in greater detail. It can be clearly seen that money supply M1 in the US and the US mortgage market index are used repeatedly in all models. This is a strong indicator that there is a strong correlation of these variables and the interest rate swap yield for the time span from April 1995 until August 2011 which was used as training set for these models. As can be seen in the previous chart the output on the hold out set (March 1991 - April 1995) is relatively accurate.
HeuristicLab Blog
Keep up with HeuristicLab development! Our developers post about new, exciting features they are working on, provide links to tutorials, teaching materials and additional goodies in the Blog.
HeuristicLab Google Group
Recently we created a Google Group for HeuristicLab. This group provides a platform for all HeuristicLab users and developers to ask questions, share comments, post feature requests, or discuss new ideas. The group is open for everyone. Feel free to join!
More details about the group are available at http://groups.google.com/group/heuristiclab. To join the group, visit the page and click on "Join this group" (requires a Google account). If you do not have a Google account, please write an e-mail to support@heuristiclab.com and we will send you an invitation to the group. After you have joined you can contact the whole group by writing e-mails to heuristiclab@googlegroups.com.
New Feature for System Identification: Model Response View
Last week I implemented a new view for symbolic regression models that makes it possible to analyse the impact of a given input variable on the output of the model in more detail. I'm already looking forward to apply it to real world scenarios.
The development efforts for this feature are tracked in ticket #1621
Chart export dialog for publication ready images
I'm working on a new export dialog for making publication-ready images of every EnhancedChart in HeuristicLab 3.3. Right-click inside a chart and select "Export Chart...". You'll get a dialog with a preview option where you can adjust the font sizes, specify the width and height in cm or inch, resolution in dpi or dpcm and even change or add axes descriptions and/or the title. Be aware that some charts have multiple chart areas and the correct one needs to be selected at the top.
The feature is still under development, see ticket #1611 for details. It's contained in the latest trunk build.
Tips to enhance it are welcomed.

rss

















