Applying Models to Data

The Apply Model task applies models generated by classification, regression and clustering tasks to new datasets. 

The options to be configured in the task depend greatly on the model the task receives in input. 


Prerequisites


Procedure

  1. Drag the Apply Model task onto the stage.

  2. Connect a task which contains the rules or clusters to be applied to the Apply Model task.

  3. Double-click the Apply Model task.

  4. Configure the options described in the Apply Model options table below.

  5. Save and compute the task.

Apply model general options

Name

Description

Available models

Select the currently available input you want to apply from the drop-down list.

Possible options are:

  • Rules (LLM tasks)

  • Association rules (Association tasks)

  • Models 

  • Clusters (standard Clustering task)

If no model is selected, the last generated model is used by default.

Save confusion matrix

If selected, the confusion matrix is saved in the execution information of the task. This information is displayed in the Results tab of the computed task. As this may result in a large amount of data, it may be preferable not to save it.  

Use output to index previous clustering

If selected, both rules and clusters will be applied, when applicable. Consequently when rules are applied the characteristics of clusters associated to the rule output are added (for example, the centroid of cluster 7 is added to rule 7).

Append results

If selected, the results of the current computation are appended to the dataset, otherwise they replace the results of the previous computations.

Apply Model LLM options

Chose method for testing

Select how you want to apply rules to the data:

  • Standard test: one output value is considered at a time and all the relevances of the rules pertaining to that value and satisfied by the input pattern are summed; the relevance values obtained are then compared and the output associated with the greatest is assigned to the pattern.

  • Modified test: it is similar to the standard test, but it also considers a relevance measure for each single condition in the rules satisfied by the input pattern.

  • AND-OR test: rules are listed according to their relevance, then the output associated with the first rule which covers the input pattern is assigned to it.

Add output score (classification rules only)

If selected a column is added, with a continuous value between -1 and +1, which represents the precision of the classification. For example, if the class "true" is +1, a score of 0.99 means the output almost certainly belongs to the class "true".

Add verified rules for each pattern

If selected, all verified rules are displayed, instead of the most important rule only.

Add probabilities for output values (classification rules only)

If selected a column is added, with a probability the precision of the class classification.

Add equivalent group indexes to output results

If selected, the index of the ambiguity group is added. An ambiguity group is a group of rows with the same input value. 

For example: 

  • 1, 10, 35 > ambiguity group 1

  • 1, 10, 35 > ambiguity group 1

  • 10, 20, 40 > ambiguity group 2

  • .....

Use absolute weights instead of relative ones

If selected the frequency of the class within the training set is considered when calculating the weight associated with each rule.

Delete rules after execution

If selected, rules are deleted after they are applied. This is useful when you want to apply the rules once only.

Merge results with original data

If selected, once applied the attributes and results are saved in the same structure.

Put results next to the related output attribute

If selected, the results of each attribute are displayed next to the attribute itself. This option is available only if you have selected the previous option to merge results with previous data.

Apply model association rules options

Print suggestions corresponding to items included in current order

If selected, the apply model can also suggest an item which is already included in the order, as a confirmation. otherwise only items which are not included in the order are suggested to extend it.

Maximum number of suggestions per order

Enter the maximum number of suggested items for each order.

Apply model cluster options

Distance method for evaluation

Select the method required for distance, from the possible values: Euclidean, Euclidean (normalized), ManhattanManhattan (normalized), Pearson.

For details on these methods see the Managing Attribute Properties page.

Replace output after forecast

If selected, during the execution the Apply Model task searches for a Cluster id column and turns it into an Output. Each row of this column is then filled with the index value of the corresponding cluster.

Use distance between profiles in Label Clustering

Applies label clustering using profiles instead of labels, as if it was were a normal clustering system.