Configuring Causal Factors

This chapter describes how to create causal factors, configure them, and populate them with data. It also describes the predefined causal factors provided by Demantra.

This chapter covers the following topics:

Notes About Causal Factors

For each causal factor, you must provide data for all time buckets, both historical and in the future. Depending on the type of causal factor, this data is stored in different locations in the database. Causal factors are associated with a specific batch engine profile.

Causal factor type Location of data How to edit the table
Global factors Column in Inputs table Business Modeler
Third-party database tool
Local causal factors other than activities Column in the sales_data table or SQL expression that aggregates data from that table Third-party database tool
Activities Column in the sales_data table Third-party database tool

Causal Factors and Engine Models

The Analytical Engine uses a set of theoretical models, each of which evaluates some or all of the data. When you configure a causal factor, you specify the following flags to specify which models should consider that causal factor:

Flag * Meaning
short For use by the short models (BWINT, IREGR, LOGREGR, LOGISTIC, and REGR). These models use all causal factors that they are given.
long For use by the long models (ARLOGISTIC, CMREGR, ELOG, ICMREGR, and MRIDGE). These models examine all the causal factors they are given, but choose the ones that give the best results.
non seasonal For use by the non seasonal models (ARIX and ARX). The only causal factors that should be flagged as non seasonal are ones that are not a predictable function of time. For example, price varies with time, but randomly, so price should be flagged as non seasonal.
multiplicative group 1 For use only by the DMULT model. If you are using this model, each causal factor should use one of these flags.
Typically you place causal factors that vary on a daily basis into one group and place all others in the other group. No causal factor should be in both groups. See "Theoretical Engine Models".
multiplicative group 2
* Name of flag as displayed in the Causal Factors screen.

Not all models use these flags. Models not listed here do not use causal factors.

Typical Flags for Causal Factors

Typically you initially flag causal factors as follows:

Causal Factor Short Long Non-Seasonal Multiplicative Group 1 Multiplicative Group 2
base (predefined) causal factors CONSTANT yes yes yes no no
t yes yes no yes no
d1, ... d12* or m1, ... m12** yes yes no no yes
d1, ... d7** yes yes no yes no
price yes yes yes yes no
your added causal factors If factor is a predictable function of time usually not yes no if factor varies by day if factor varies by month
If factor is not a predictable function of time usually not yes yes no no
*Included only if time resolution is monthly or weekly.
**Included only if time resolution is daily.

Important: In many cases, these flags have to be adjusted. Contact Oracle for assistance.

Creating a Global Factor

A global causal factor has time-varying data that applies in the same way to all items and locations.

To create a global causal factor

  1. Do one of the following:

    • Go into the database and add a column to the Inputs table.

    • Create the global causal factor within the Business Modeler user interface, as follows:

      1. Click Data Model > Global Factors > Options to access the global factor user interface.

      2. Click Data Model > Global Factors > New Factor. The New Factor dialog box appears.

      3. Type in the factor name.

      4. Click Add New Factor.

      5. Click Cancel to close the dialog box. The Business Modeler adds a new column to the Inputs table.

  2. Load data into the new column by using a script, a database tool, or the Business Modeler.

To use the Business Modeler, do the following

  1. Click Data Model > Global Factors > Options.

  2. Click Data Model > Choose Factor. Or click the Choose Factor button.

  3. The Choose Factor dialog box appears.

  4. Check the check box for each of the causal factors you wish to view. Make sure that Date is selected so that you can see the dates along with the causal factor data.

  5. Click OK.

  6. Click Data Model > Global Factors > View. Or click the Create View button.

    Business Modeler displays a table that shows the value of each global factor over time. This table displays one row for each base time bucket in the planning horizon. Each column corresponds to one global factor.

    the picture is described in the document text

  7. Select the cell or cells to be edited. The editable cells are colored white. When selected, the cells turn yellow.

  8. Click Data Model > Global Factors > Edit Data. Or click the Edit Data button.

    The Edit Data dialog box appears.

  9. Type the number required and click OK.

    The data appears in each highlighted cell.

  10. Click Save to save your changes.

  11. Click Cancel to close the dialog box.

  12. Configure the global factor as described in "Configuring Global and Local Causal Factors".

    See also

    Creating a Local Causal Factor

    "Base Causal Factors"

Creating a Local Causal Factor

A local causal factor has time-varying data that is potentially different for each item-location combination.

To create data for a local causal factor

  1. If the sales_data table does not include a column that contains the data you want to use as a causal factor, go into the database and add the desired column.

  2. Load data into the new column by using a script or by a database tool.

  3. Configure the new causal factor as described in "Configuring Global and Local Causal Factors".

    See also

    "Creating a Global Factor"

Setting up the price causal factor

The predefined price causal factor uses the field item_price in the sales_data table. You should make sure that this data is available.

Transpose Function

This allows one causal to be converted into several causals using a transpose function, with different transpose values in different periods resulting in engine accepting multiple causals instead of one. Transpose function should only refer to sales_data and mdp_matrix tables. Transpose is done after information is aggregated and it is important to ensure underlying values are consistent.

Configuring Global and Local Causal Factors

Here you provide information about how the Analytical Engine should use each global and local causal factor.

To configure a causal factor

  1. Click Engine > Forecast Tree. Or click the Forecast Tree button.

  2. Select the batch engine profile for which you want to configure causal factors and click OK.

    Note: The simulation engine profiles inherit the causal factor settings from the parent batch engine profile.

  3. Click Next repeatedly until you reach the Causal Factors dialog box.

  4. If the causal factor is not yet listed here, do the following:

    1. Click Add.

      A new line is displayed.

    2. Describe the new causal factor by specifying the following:

      Factor Name Depends on the type of causal factor:
      • For a global factor: name of an existing column in the Inputs table.

      • For a local causal factor, this can be the name of an existing column in the sales_data table. The factor name can also just be a name; in this case, you must specify an expression in the Local Function field.

      • For an activity: name of a column in the sales_data table. Business Modeler adds this column automatically if it does not yet exist.

      Factor Type Choose one of the following:
      • global

      • local

      • activity (a special kind of local causal factor that supports shape modeling)


      Do not use the event choice, which is an older implementation of the more general local choice. The price option is useful only for the predefined price causal factor.
    3. Specify how the Analytical Engine should use the causal factor. To do so, specify the following values:

      Short Usually you enable this check box only for the following global causal factors: Constant, t, d1, ... d12. See "Typical Flags for Causal Factors".
      Long Usually you enable this check box for all causal factors. See "Typical Flags for Causal Factors".
      Multiplicative Group 1 Enable this check box to include this causal factor in the first multiplicative group for use by the DMULT model; you should enable this check box for at least one causal factor.
      Typically you place causal factors that vary on a daily basis into one group and place all others in the other group. No causal factor should be in both groups. see "Theoretical Engine Models".
      This setting affects only the DMULT model.
      Multiplicative Group 2 Enable this check box to include this causal factor in the second multiplicative group for use by the DMULT model; you should enable this check box for at least one causal factor.
      This setting affects only the DMULT model.
      Non Seasonal Enable this check box if the data associated with this causal factor is not known to be a predictable function of time. For example, price varies with time, but randomly, so price should be flagged as non seasonal. See "Typical Flags for Causal Factors".
      Fill Causals Specifies whether Demantra should interpolate when values are missing for a date. The missing local causal factor will receive the average of its nearest two non-missing neighbors.
      For example:
      • If the causal values are 1, missing, and 2, then Demantra replaces the missing value with 1.5.

      • If the causal values are 1, missing, missing, missing, and 2, then Demantra replaces each missing value with 1.5.

      Shape Indicator Only for activities. Specifies whether Demantra should perform shape analysis and calculations on this activity.
      Omit Seasonal Only for activities. This option specifies whether to nullify values of the global seasonal causal factors for the time buckets during which the causal factor occurs. Specifically this refers to the causal factors d1—d12 or d1—d7 and m1—m12. For example, if you have monthly data and you omit seasonal effects for a given causal factor Promo1, that means that Demantra switches off the causal factors for the duration of Promo1.
      By omitting seasonal effects, you enable Demantra to capture the shape more clearly for the analysis. This option is suitable only if you expect the effect of this causal factor to be much stronger than the seasonal effects.
      If causal factors overlap each other, then Demantra gives precedence to the causal factor that you have flagged to omit seasonal effects.
      Local Function Only for local causal factors. An SQL expression that describes how to aggregate causal factor data from the lowest level data. Use one of the following SQL aggregating functions:
      • Min

      • Max

      • Sum

      • Avg


      Within the expression, refer to the name of the causal factor (the column name in which the causal factor is stored).
      Within the expression, you can also refer to fields in the mdp_matrix table.
      You can also include tokens of the form #FORE@<Version>#. See "Server Expression Functions and Operators".
    4. Add comments to the Comments field, if desired.

  5. Click Validate to check the validity of the configuration.

  6. Click Save to save changes.

  7. Do one of the following:

    • Click Next.

      If you created any activities, Business Modeler displays a message indicating the name of the series that it automatically creates for each activity.

      For PE mode, then the Business Modeler displays the Promotional Causal Factors dialog box. See "Configuring Promotional Causal Factors".

    • Click Exit.

    See also

    "Configuring Promotional Causal Factors"

    "Base Causal Factors"

About Activity Shape Modeling

In shape modeling, you capture the profile of the demand over the duration of a promotion. The Analytical Engine models the overall demand as a linear combination of Oracle proprietary shapes, as many as eight shapes; this information replaces the normal causal factor that would have been used instead. The Analytical Engine calculates the coefficients for each shape, for each relevant combination.

Remember that when you enable shape modeling for a causal factor, the single causal factor is replaced by up to eight causal factors. To keep the number of causal factors down, you can specify the maximum number of shapes permitted for activity shape modeling.

Note: Shape modeling capabilities are different in the two engine modes:

See "Engine Modes: DP and PE".

Shape Alignment

Each stored shape is an average of the past instances of that particular shape. It is important to understand that the stored information consists of both the shape and the actual amplitude of the curve.

When the Analytical Engine observes the beginning of a new instance of a given shape, it is necessary to decide how to set the amplitude of the new curve that it generates. By default, the engine assumes that the amplitude of the stored shape should be taken into consideration. Therefore, when the Analytical Engine generates the new shape, it averages the new data together with the stored shape, as follows:

the picture is described in the document text

The default behavior is appropriate when the history contains many instances of a given shape. When the shape is new to the system, however, it is more appropriate to force the Analytical Engine to re-scale the generated shape so that it aligns with the most recent observations:

the picture is described in the document text

To force this realignment you use the QAD (quantity alignment duration) series associated with the shape. This series specifies the number of time buckets during which this alignment should occur, starting with the beginning of the shape. If you need to align the shape, you generally should align the entire shape; that is, you set the series equal to the expected length of the shape.

Samples of Activity Shape Modeling

To see samples, use the UPGRADE_TO_SHAPE_MODELLING procedure, which does the following:

See also

"Enabling Activity Shape Modeling"

Enabling Activity Shape Modeling

To enable activity shape modeling

  1. For each specific shape you want to represent, create the causal factor data, as described in "Creating a Local Causal Factor".

  2. Configure this causal factor as type Activity, as described in "Configuring Global and Local Causal Factors".

    When you configure this causal factor as an activity (named, for example, Product Launch), the Business Modeler automatically creates two series that constitute the user interface for the activity. These series are as follows:

    Generic name / Example name Purpose
    Causal-factor-name/ ProductLaunch Lets the user indicate the start and duration of the activity associated with a specific combination. Within this series, for each date, the user chooses "Start" or "Active" from a drop-down menu to specify the promotion start and continuation dates. The default is "None," meaning no promotion. The user identifies past activities and marks where future activities will occur.
    Causal-factor-name_QAD/ ProductLaunch_QAD Controls whether the Analytical Engine re-scales the generated shape to align with the amplitude of the most recent observed instance of this shape, for a given combination.
    By default, this is zero, and the Analytical Engine averages the most recent data with the stored shape, which is an average of all the past observations of this shape.
    When the shape is "new" to the system, the user should set ProductLaunch_QAD equal to the typical length of the activity, so that the new data takes precedence.
  3. Add these series to a worksheet at the appropriate aggregation level.

  4. Edit the Causal-factor-name series to identify when the activity occurred and when it will occur and save the changes.

  5. If appropriate, use the Causal-factor-name_QAD series to control whether to realign the shape. Edit the series and save the changes.

  6. To specify the maximum number of Oracle proprietary shapes that the Analytical Engine can use for activity shape modeling, set the NumShapes parameter.

  7. Run the Analytical Engine as usual.

    See also

    "About Activity Shape Modeling"

Deleting a Causal Factor

To delete a causal factor

  1. Click Engine > Forecast Tree. Or click the Forecast Tree button.

  2. Select the Engine Profile that contains the causal factor you want to delete and click OK.

  3. Click Next repeatedly until you reach the Causal Factors dialog box or (PE mode only) the Promotional Causal Factors dialog box.

  4. Click the causal factor you want to delete.

  5. Click Delete.

  6. Business Modeler asks for confirmation. Click Yes or No.

    See also

    "Configuring Global and Local Causal Factors"

    "Configuring Promotional Causal Factors"