Inputs for predictive metrics
A predictive metric can be created using attributes and metrics as its inputs. How you define the attributes and metrics you use as inputs for your predictive metrics affects the resulting predictive metrics, as described in:
Attributes as inputs for predictive metrics
Attributes can be used as inputs for predictive metrics. Data mining often analyzes non-numeric, demographic, and psychographic information about customers, looking for attributes that are strong predictors.
For example, your MicroStrategy project contains a Customer attribute with related attributes for age, gender, and income. You can include an attribute, such as the Customer attribute, directly in a training metric, as described in
Creating a predictive model using MicroStrategy.
By including an attribute directly in a training metric, a predictive metric is then created that includes the attribute as one of its inputs. When using attributes directly in training metrics to create predictive metrics, be aware of the following:
| • | The ID attribute form for the attribute is used by the training metric to include the attribute information in a predictive metric. If attributes include additional attribute forms other than the ID form that are to be used as inputs for predictive metrics, you can create metrics based on these attribute forms. Once these metrics are created, they can then be used as inputs for predictive metrics. This scenario for creating attribute-based predictive metrics is described in Creating metrics to use additional attribute forms as inputs for predictive metrics below. |
| • | Attribute forms must use a text or numeric data type. If the attribute form uses a date data type, the data cannot be correctly represented when creating the predictive metric. If an attribute form uses date values, you must convert the date values into a numeric format to use the attribute form to create predictive metrics. |
Creating metrics to use additional attribute forms as inputs for predictive metrics
If attributes include additional attribute forms other than their ID
form that are to be used as inputs for predictive metrics, you can create metrics based on these attribute forms. The resulting metric can then be used as an input for a predictive metric, thus allowing the attribute information to be included in a predictive metric.
The steps below show you how to create a metric based on an attribute form. The resulting metric, which contains the attribute information, can then be used to create a predictive metric.
Prerequisite
| • | This procedure assumes you are familiar with the process of creating a metric. For steps on how to create metrics, see Advanced Metrics. |
To create metrics to use additional attribute forms as inputs for predictive metrics
| 1 | Using the Metric Editor, create a new metric expression. All metric expressions must have an aggregation function. To support including attribute information in the metric expression, in the Definition area, type Max() to use the Max aggregation function. |
| 2 | Within the parentheses of the Max() aggregation function, specify the desired attribute form using the AttributeName @ FormName format, where: |
| • | AttributeName : Is the name of the attribute. If there are spaces in the attribute name, you can enclose the attribute name in square brackets ([] ). |
| • | FormName : Is the name of the attribute form. Be aware that this is different than the attribute form category. If there are spaces in the attribute form name, you can enclose the attribute form name in square brackets ([] ). |
For example, in the image shown below the Discount form of the Promotion attribute is included in the metric.
| 3 | Add the attribute as a metric level so that this metric always returns results at the level of the attribute. |
| 4 | If the predictive metric is to be used to forecast values for elements that do not exist in your project, you must define the join type for the metric used as an input for the predictive metric to be an outer join. For example, the predictive metric is planned to forecast values for one year in the future. Since this future year is not represented in the project, you must define the join type for the metric used as an input for the predictive metric to be an outer join so that values are returned. |
To enable outer joins to include all data:
| a | Select Metric Join Type from the Tools menu. The Metric Join Type dialog box opens. |
| b | Clear the Use default inherited value check box. |
| d | Click OK to close the dialog box. |
| 5 | If you plan to export predictive metric results to a third-party tool, you should define the column alias for the metric used as an input for the predictive metric. This ensures that the name of the metric used as an input for the predictive metric can be viewed when viewing the exported results in the third-party tool. |
To create a metric column alias to ensure the column name matches the metric’s name:
| a | Select Advanced Settings from the Tools menu, and then select Metric Column Options. The Metric Column Alias Options dialog box opens. |
| b | In the Column Name field, type the alias. |
| c | Click OK to close the dialog box. |
Level metrics as inputs for predictive metrics
The attribute used on the rows of the dataset report sets the level of the data by restricting the data to a particular level, or dimension, of the data model.
For example, if the Customer attribute is placed on the rows and the Revenue metric on the columns of a report, the data in the Revenue column is at the customer level. If the Revenue metric is used in the predictive model without any levels, then the data it produces changes based on the attribute of the report using the predictive metric. If Year is placed on the rows of the report described previously, the predictive metric calculates yearly revenue rather than customer revenue. Passing yearly revenue to a predictive model based on customer revenue yields the wrong results.
This problem can be easily resolved by creating a separate metric, which is then used as an input for the predictive metric. This separate metric can be created to match the metric definition for Revenue, but also define its level as Customer. This approach is better than adding a level directly to the Revenue metric itself because the Revenue metric may be used in other situations where the level should not be set to Customer. Such a metric would look like the following.
Prerequisite
| • | This procedure assumes you are familiar with the process of creating a metric. For steps on how to create metrics, see Advanced Metrics. |
To create level metrics to use as inputs for predictive metrics
| 1 | In the Metric Editor, open the metric that requires a level. |
| 2 | Clear any Break-by parameters that may exist on the metric’s function: |
| a | Highlight the function in the Definition pane to select it. |
| b | Right-click the function and then select Function_Name parameters. The Parameters dialog box opens. |
| c | On the Break By tab, click Reset. |
| d | Click OK to close the dialog box. |
| 3 | Add the necessary attributes as metric levels: |
| a | Click Level (Dimensionality) on the Metric component pane. |
| b | In the Object Browser, double-click each attribute to add as a level. |
| 4 | If the predictive metric is to be used to forecast values for elements that do not exist in your project, you must define the join type for the metric used as an input for the predictive metric to be an outer join. For example, the predictive metric is planned to forecast values for one year in the future. Since this future year is not represented in the project, you must define the outer join type for the metric used as an input for the predictive metric so that values are returned. |
To enable outer joins to include all data:
| a | Select Metric Join Type from the Tools menu. The Metric Join Type dialog box opens. |
| b | Clear the Use default inherited value check box. |
| d | Click OK to close the dialog box. |
| 5 | If you plan to export predictive metric results to a third-party tool, you should define the column alias for the metric used as an input for the predictive metric. This ensures that the name of the metric used as an input for the predictive metric can be viewed when viewing the exported results in the third-party tool. |
To create a metric column alias to ensure the column name matches the metric’s name:
| a | Select Advanced Settings from the Tools menu, and then select Metric Column Options. The Metric Column Alias Options dialog box opens. |
| b | In the Column Name field, type the alias. |
| c | Click OK to close the dialog box. |
Conditional metrics as inputs for predictive metrics
To group a metric’s results by an attribute, create a conditional metric for each category. For example, you want to use customer revenue grouped by payment method in your data mining analysis. If you place the Customer attribute on the rows of the report, the Revenue metric on the columns, and the Payment Method attribute on the columns, you get the following report as a result:
However, this report presents problems if it is used as a dataset report because multiple headings are generated for all the columns, specifically, Revenue and each Payment Method. Additionally, each column is revenue for a particular payment method and unless there is a metric that matches this definition, it is difficult to successfully deploy any model that uses one of these columns.
To solve this problem, create a separate metric, which is then used as an input for a predictive metric, that filters Revenue for each Payment Method. This has the same definition as the original Revenue metric, but its conditionality is set to filter Revenue by a particular Payment Type.
Prerequisite
To create a conditional predictive metric
| 1 | Create a separate filter for each of the necessary attribute elements. For the example above, they are Payment Method = Visa, Payment Method = Amex, Payment Method = Check, and so on. |
| 2 | For each metric, create a separate metric to be used as an input for a predictive metric, as explained in the section above. |
| 3 | Add the filters you created as conditions of the metric-based predictive input metric. Save the metric. You can now include the metric in a training metric to create a predictive metric, as described in Creating a predictive model using MicroStrategy. |
The following report uses conditional metrics to generate the same results as the first report but in a dataset report format.
I have found great and massive information on. Thanks for sharing
ReplyDeleteLearn Micro Strategy Online
Micro Strategy Dossier Training
your valuable information and time. Please keep updating.
ReplyDeleteMicrostrategy Online Course
Microstrategy Certification
nice information thanks for sharing..!
ReplyDeletemicro strategy certification training