How to Perform a Line Similarity Comparison

How to Perform a Line Similarity Comparison


Note: The Line Similarity tool cannot be used unless you have created a suitable line chart to base the calculation on. For example, you cannot use multiple Y-axes scales or an X-axis which is both continuous and binned when performing a line similarity comparison. See below for more information about how to set up the line chart.

  1. Create a line chart visualization by clicking on the New Line Chart button on the toolbar, line_new_line_chart_button.png.

    Comment: The tool uses the lines specified in a line chart to define the data for the calculation.

  2. Make sure that all values that should be included in the calculation are selected on the Y-axis.

  3. If more than one column is selected on the Y-axis, make sure that (Column Names) is selected on the X-axis.

    Comment: (Column Names) is an option that treats the names of the columns selected on the Y-axis as separate categories.

  4. Use Line By, Color By or Trellis By to split the lines according to at least one column, in order to create multiple lines.

    Comment: See examples on how to split lines on How to Use the Line Chart. If you want to create one line for each individual row, one of these options must be set to define a unique identifier for all rows.  "(Row Number)" is a fictive column representing the row index of all rows and can be used for this purpose.

  5. If desired, mark one or more lines to use as the master line against which the search will be performed.

  6. Select Tools > Line Similarity....

    Comment: You can also right-click in the line chart and select Line Similarity... from the pop-up menu.

    Response: The Line Similarity dialog is displayed.

  7. Make sure that the line chart you just created is selected under Line chart to work on.

  8. Select whether to Create new result columns or Update existing result columns.

    Comment: Update existing is only available when you have previously performed a line similarity comparison during this analysis.

  9. Select a Distance measure to use in the calculation.

    Comment: For more information see Correlation or Euclidean distance.

  10. Select whether to use a master line Based on marked lines or on a Custom shape.

    Comment: Marked lines create a master line which is the average of all marked lines. With the custom alternative, you can select a master line from a number of predefined line shapes.

    Comment: If the currently marked lines contain empty values they cannot be used to create a master line, and the custom alternative will automatically be selected.

  11. Click OK.

    Response: Two new columns are added to the data table (and two new filters representing the columns are shown in the filters panel).

    Comment: Note that the result columns are based on a snapshot of the line chart from the moment of performing the calculation and they may become invalid when any additional filtering is applied.

Tip: If you do not want to be able to overwrite the result columns by consequent calculations, or when saving an analysis file with linked data, you can turn them into static columns by performing the following: Select Edit > Column Properties. Click on a result column to select it, and then click on the Freeze Column button in the lower part of the General tab.

See also:

Details on Line Similarity