The SIMILARITY Procedure

ODS Graphics

Statistical procedures use ODS Graphics to create graphs as part of their output. ODS Graphics is described in detail in Chapter 21: Statistical Graphics Using ODS in SAS/STAT 12.3 User's Guide.

Before you create graphs, ODS Graphics must be enabled (for example, with the ODS GRAPHICS ON statement). For more information about enabling and disabling ODS Graphics, see the section Enabling and Disabling ODS Graphics in that chapter.

The overall appearance of graphs is controlled by ODS styles. Styles and other aspects of using ODS Graphics are discussed in the section A Primer on ODS Statistical Graphics in that chapter.

This section describes the use of ODS for creating graphics with the SIMILARITY procedure.

ODS Graph Names

PROC SIMILARITY assigns a name to each graph it creates by using ODS. You can use these names to selectively reference the graphs. The names are listed in Table 24.3.

Table 24.3: ODS Graphics Produced by PROC SIMILARITY

ODS Graph Name

Plot Description

Statement

PLOTS= Option

CostsPlot

Costs plot

SIMILARITY

PLOTS=COSTS

NormalizedSequencePlot

Normalized Sequence Plot

SIMILARITY

PLOTS=NORMALIZED

PathDistancePlot

Path distances plot

SIMILARITY

PLOTS=DISTANCES

PathDistanceHistogram

Path distances histogram

SIMILARITY

PLOTS=DISTANCES

PathRelativeDistancePlot

Path relative distances plot

SIMILARITY

PLOTS=DISTANCES

PathRelativeDistanceHistogram

Path relative distances histogram

SIMILARITY

PLOTS=DISTANCES

PathPlot

Path plot

SIMILARITY

PLOTS=PATHS

PathSequencesPlot

Path sequences plot

SIMILARITY

PLOTS=MAPS

PathSequencesScaledPlot

Scaled path sequences map plot

SIMILARITY

PLOTS=MAPS

ScaledSequencePlot

Scaled Sequence plot

SIMILARITY

PLOTS=SCALED

SequencePlot

Sequence plot

SIMILARITY

PLOTS=SEQUENCES

SeriesPlot

Input time series plot

SIMILARITY

PLOTS=INPUTS

SimilarityPlot

Similarity measures plot

SIMILARITY

PLOTS=MEASURES

TargetSequencePlot

Target sequence plot

SIMILARITY

PLOTS=TARGETS

WarpPlot

Warping plot

SIMILARITY

PLOTS=WARPS

WarpScaledPlot

Scaled warping plot

SIMILARITY

PLOTS=WARPS


Time Series Plots

The time series plots (SeriesPlot) illustrate the input time series to be compared. The horizontal axis represents the input series time ID values, and the vertical axis represents the input series values.

Sequence Plots

The sequence plots (SequencePlot) illustrate the target and input sequences to be compared. The horizontal axis represents the (target or input) sequence index, and the vertical axis represents the (target or input) sequence values.

Path Plots

The path plot (PathPlot) and path limits plot (PathLimitsPlot) illustrate the path through the distance matrix. The horizontal axis represents the input sequence index, and the vertical axis represents the target sequence index. The dots represent the path coordinates. The upper parallel line represents the compression limit, and the lower parallel line represents the expansion limit. These plots visualize the path through the distance matrix. Vertical movements indicate compression, and horizontal movements represent expansion of the target sequence with respect to the input sequence. These plots are useful for visualizing the amount of expansion and compression along the path.

Time Warp Plots

The time warp plot (WarpPlot) and scaled time warp plot (WarpScaledPlot) illustrate the time warping. The horizontal axis represents the (input and target) sequence index. The upper line plot represents the target sequence. The lower line plot represents the input sequence. The lines that connect the input and target sequence values represent the mapping between the input and target sequence indices along the optimal path. These plots visualize the warping of the time index with respect to the input and target sequence values. Expansion of a single target sequence value occurs when it is mapped to more than one input sequence value. Expansion of a single input sequence value occurs when it is mapped to more than one target sequence value. The plots are useful for visualizing the mapping between the input and target sequence values along the path. The plots are useful for comparing the path sequences or input and target sequence after time warping.

Path Sequence Plots

The path sequence plot (PathSequencesPlot) and scaled path sequence plot (PathSequencesScaledPlot) illustrate the sequence mapping along the optimal path. The horizontal axis represents the path index. The dashed line represents the time warped input sequence. The solid line represents the time warped target sequence. These plots visualize the mapping between the input and target sequence values with respect to the path index. The scaled plot with the input and target sequence values are scaled and evenly separated for visual convenience.

Path Distance Plots

The path distance plots (PathDistancePlot) and path relative distance plots (PathRelativeDistancePlot) illustrate the path (relative) distances. The horizontal axis represents the path index. The vertical needles represent the (relative) distances. The horizontal reference lines indicate one and two standard deviations.

The path distance histogram (PathDistanceHistogram) and path relative distance histogram (PathDistanceRelativeHistogram) illustrate the distribution of the path (relative) distances. The bars represent the histogram, and the solid line represents a normal distribution with the same mean and variance.

Cost Plots

The cost plot (CostPlot) and cost limits plot (CostPlot) illustrate the cost of traversing the distance matrix. The horizontal axis represents the input sequence index, and the vertical axis represents the target sequence index. The colors and shading within the plot illustrate the incremental cost of traversing the distance matrix. The upper parallel line represents the compression limit, and the lower parallel line represents the expansion limit.