Evaluate Forecasts By Location (Space Time Pattern Mining)

Summary

Selects the most accurate among multiple forecasting results for each location of a space-time cube. This allows you to use multiple tools in the Time Series Forecasting toolset with the same time series data and select the best forecast for each location.

Learn more about how Evaluate Forecasts By Location works

Illustration

Evaluate Forecasts By Location tool illustration
Multiple forecasts are displayed with the most accurate forecast highlighted in the legend.

Usage

  • All space-time cubes provided in the Input Forecast Space Time Cubes parameter must be created by tools in the Time Series Forecasting toolset using the same input space-time cube.

  • For each location, this tool identifies the forecast method that provides the smallest Validation or Forecast root mean square error (RMSE). This can result in different methods being identified for locations that are near each other. For example, if your data represents the yearly population of counties, one county may use a forest-based method, and two neighboring counties may use a Gompertz curve and a seasonal exponential smoothing method. Consider whether it makes sense for different locations to use different forecast methods with different shapes, and determine whether selecting the forecast method by location provides a notable reduction in the Forecast or Validation RMSE at the locations. If using a single method at every location is nearly as accurate as using a different method location by location, the principle of parsimony states a single forecast method for all locations is preferred.

  • The Output Features will be added to the Contents pane with rendering based on the final forecasted time step of the selected method at each location.

  • This tool creates geoprocessing messages and interactive pop-up charts to help you understand and visualize the results. The messages contain information about the structure of the space-time cube, summary statistics of the RMSE values, and summaries of the number of locations represented by each forecast method. Clicking a feature using the Explore tool displays a line chart in the Pop-up pane showing the values of the space-time cube and the forecasted values of each forecast method. The forecast method selected at the location is highlighted in the chart.

  • Forecast methods created using the Forest-based Forecast tool usually provide the best fit to the time series of a location, but they often do not forecast values more accurately than other methods. If any of the input forecast space-time cubes represent a forest-based method, it is recommended that you keep the Evaluate Using Validation Results parameter checked.

  • If any of the input forecast space-time cubes forecast a different number of future time steps than another cube, the output will contain the forecasts for the fewest number of time steps. For example, if two space-time cubes are provided and the first forecasts three time steps and the second forecasts five time steps, the Output Features and Output Space Time Cube will forecast three future time steps.

  • If the Evaluate Using Validation Results parameter is unchecked, the Diebold-Mariano (DM) or Harvey, Leybourne, and Newbold (HLN) test is used to compare the selected method and all other methods at each location. These tests determine whether the selected method provides a significantly better fit to the time series than the methods that were not selected.

    Learn more about the HLN test for equivalent accuracy of forecasts

  • If you previously chose to detect outliers in any of the space-time cubes you provided in the Input Forecast Space Time Cubes parameter, this information will not be included in the output features or output space-time cube.

  • The space-time cubes provided in the Input Forecast Space Time Cubes parameter cannot be used as intermediate data variables in ModelBuilder if the cubes are not already saved as netCDF files. If any of the space-time cubes are created in a model and do not yet exist as files, you must run each tool in ModelBuilder before running the entire model.

Parameters

LabelExplanationData Type
Input Forecast Space Time Cubes

The input space-time cubes containing forecasts to be compared. To be compared, all forecast cubes must be created from the same original time series data.

File
Output Features

The new output feature class representing the locations of the space-time cube and fields containing the forecast values of the selected method at each location. The pop-ups of the features display charts of the original time series data and the forecasts of all methods.

Feature Class
Output Space Time Cube
(Optional)

The output space-time cube (.nc file) containing the original time series data with the forecasts of the selected method at each location. The Visualize Space Time Cube in 3D tool can be used to view the original and forecasted values simultaneously.

File
Evaluate Using Validation Results
(Optional)

Specifies whether the forecast method for a location will be determined using the smallest Validation RMSE or smallest Forecast RMSE.

  • Checked—The forecast method will be determined using the smallest Validation RMSE. This is the default.
  • Unchecked—The forecast method will be determined using the smallest Forecast RMSE.

Boolean

arcpy.stpm.EvaluateForecastsByLocation(in_cubes, output_features, {output_cube}, {evaluate_using_validation_results})
NameExplanationData Type
in_cubes
[in_cubes,...]

The input space-time cubes containing forecasts to be compared. To be compared, all forecast cubes must be created from the same original time series data.

File
output_features

The new output feature class representing the locations of the space-time cube and fields containing the forecast values of the selected method at each location. The pop-ups of the features display charts of the original time series data and the forecasts of all methods.

Feature Class
output_cube
(Optional)

The output space-time cube (.nc file) containing the original time series data with the forecasts of the selected method at each location. The Visualize Space Time Cube in 3D tool can be used to view the original and forecasted values simultaneously.

File
evaluate_using_validation_results
(Optional)

Specifies whether the forecast method for a location will be determined using the smallest Validation RMSE or smallest Forecast RMSE.

  • USE_VALIDATIONThe forecast method will be determined using the smallest Validation RMSE. This is the default.
  • NO_VALIDATIONThe forecast method will be determined using the smallest Forecast RMSE.
Boolean

Code sample

EvaluateForecastsByLocation example 1 (Python window)

The following Python script demonstrates how to use the EvaluateForecastsByLocation function:

import arcpy
arcpy.env.workspace = "C:/Analysis"

# Compare and merge three forecasts from three forecasts.
arcpy.stpm.EvaluateForecastsByLocation("CurveFit.nc;ExpSmooth.nc;ForestBased.nc", 
                                       "Analysis.gdb/Forecasts", 
                                       "outEvaluate.nc","USE_VALIDATION")
EvaluateForecastsByLocation example 2 (stand-alone script)

The following Python script demonstrates how to use the EvaluateForecastsByLocation function to forecast population:

# Compare and merge three forecasts

# Import system modules
import arcpy

# Set property to overwrite existing output.
arcpy.env.overwriteOutput = True

# Set workspace
workspace = r"C:\Analysis"
arcpy.env.workspace = workspace

# Run tool
arcpy.stpm.EvaluateForecastsByLocation(["CurveFit.nc", "ExpSmooth.nc", "ForestBased.nc"], 
                                       "Analysis.gdb/Forecasts", "outEvaluate.nc",
                                       "USE_VALIDATION")