New web-based multi-objective data interactive visualization tools

Every once in a while I check D3’s webside and find several new online data visualization that could be put to good use by water systems engineers. The two tools that will be presented here were found at D3’s website and adapted from Kai Chung’s (interactive parallel axis plot, licensed under the BSD licence) and Benjiec’s (interactive pair-wise scatter plot, licensed under the MIT licence) codes.

Interactive Parallel Axis Tool

The current version of the interactive parallel axes tool can be found here. Its features are:

  • Colors by group
  • Data brushing
  • Pie charts indicating group breakdown and total brushed, updated as brushing is performed
  • Export, keep, and remove data manipulation tools for brushed data
  • Variable line opacity for clean visualization of large data sets

The first step to use the tool is to create a column in your data file called “group” (all in small letters), and assign a group to each data point in the file. All columns must have header names. Then open the parallel axes tool website and click on the “choose file” button:

Untitled.png

A dialog should open for you to upload your data file:

Untitled2.png

After uploading your data file, your screen should look similar to this:

Untitled3.png

In the above screenshot you see:

  1. The group coloring legend
  2. The parallel axes plot
  3. Your data in a tabular format
  4. Data manipulation buttons
  5. Pie chart breakdown of your data

More details about each feature are given next. If your data set is large (dozens of points or more) it may be hard to identify an individual in the plot so that you can compare it with the others. One way to get around this is by hoovering the mouse over the data in tabular format. If you place the mouse over a certain row in the table, the corresponding line in the plot will be highlighted, as shown below:

Untitled5.png

In order to brush off points out of a given interval on one of the axes, just hold click on a point on the axis and drag the mouse up and down. Multiple axes can be brushed at a given time, although only one interval per axis is allowed. The data breakdown pie charts automatically update to reflect the data left in the plot. After brushing, the chart should look like the one below.

Untitled6.png

If you want to explore the tradeoffs between two axes that are not next to each other, you can hold click on an axis title and drag it to the position next to the axis you want to compare it to.

Untitled7.png

After brushing, you may want to create a new data set off the remaining data points in the plot. If you click on the “Export” button on the top right corner of the chart, a new CSV (Comma Separated File) file containing only the remaining points will be download to your computer.

Untitled8.png

If, on the other hand, you are using brushing to select points you want to get rid of, just click on the “Remove” button after brushing your data.

Untitled9.png

The resulting data set will consist of the points that were brushed off. The keep button has the opposite effect.

Untitled10.png

Interactive Pairwise Scatter Plot Tool

The features of the interactive pairwise scatter plot tool are:

  • Colors by data group
  • Data brushing
  • Display only certain data groups
  • Group breakdown scatter plots

The first step to use the tool is to create a column in your data file called “group” (all in small letters), and assign a group to each data point in the file. After this is done, open the parallel axis tool website and click on the “choose file” button:

Untitled11.png

A dialog should open for you to upload your data file:

Untitled12.png

After uploading your data file, your screen should look similar to this:

Untitled13.png

In the above screenshot you see:

  1. A “+” and a “-” links to increase or decrease the size of the scatter plots.
  2. Two links for how to color the plot, if uniform color or by group
  3. Which data columns to plot.
  4. Which groups to breakdown in scatter plots
  5. The scatter plots

More details about each are given next. If your file has too many data columns and you only want to visualize pairwise scatter plots of a few of them, this can be done by unchecking the boxes under “Include variables” corresponding to the columns you want to hide.

In order to brush off points out of a given a pairwise interval in one of the subplots, just hold click on a point on the axis and drag the mouse to select the interval. Only one subplot can be brushed at a given time. After hiding one of the variables and brushing the plot, the chart should look like the one below.

Untitled14.png

If you click on the “group” link under “select a variable to color”, your data points will be assigned colors according to the group they belong to, as in the screenshot below.

Untitled15.png

If you check any two boxes under “Drill and Expand”, the first checked box will be made the x-axis of all subplots and the variables corresponding tot he unchecked boxes will be in the y-axes of each row of subplots. The second checked box will be broken into multiple smaller intervals, which effectively brushes the data into tiny intervals, each represented in a subplot.

Untitled16.png

I hope you find these tools useful!

 

Advertisements

Extracting Data from Borg Runtime Files

When using the I/O version of Borg MOEA, there is an option to output runtime information throughout optimization (this information is saved to the file designated by the “-R” flag at a frequency set by the “-F” flag). These files can be very useful in diagnostics of the search process, but the appropriate information must first be extracted from the files. One issue I ran into was figuring out how to extract specific information from these files, rather than everything. Conveniently, with MOEAFramework this can be done with ease.  In section 11.2.2 of the Manual (MOEAFramework 2.7), the ExtractData command is explained.

To begin, you’ll want to have your runtime file, your reference set and the directory for MOEAFramework all in the same directory. Once you have these files together, you can use a command line similar to the one below to extract data from the runtime file:

java org.moeaframework.analysis.sensitivity.ExtractData 
  --problem {problem in MOEAFramework} 
  --input {your runtime file}
  --reference {your reference set}
  --output {youroutput file}
  NFE ElapsedTime +hypervolume

Now, there are three comments that may be useful on this. First, you may need to add some additional commands after the initial “java” to ensure MOEAFramework will be located and run correctly. You can tell java where to find the MOEAFramework .JAR file by using “-Djava.ext.dirs={directory}” and you can tell it which .JAR to use by using “-classpath {MOEAFramework….jar}”.

Second, you can include additional performance indicators in any order. For example, generational distance is included with +generational, and additive ϵ-indicator with +epsilon. Others can be found in section 11.2.2 of the manual.

Third, I found that even if your problem is not included in MOEAFramework, “-dimension” can be used instead of “–problem”. For this, you simply tell MOEAFramework the number of dimensions (objectives) in the objective space.