When using the multi-label modeling operator, is the Set role operator required?

kimjk3559
kimjk3559 Altair Community Member
edited November 5 in Community Q&A
read csv > split(train, test) > multi label modeling > multi performance
                                   > apply model

Referring to the tutorial of the multi label modeling operator,
I created a very simple process as above and accidentally did not include the set role operator.

However, the label values of the test set were predicted normally and the errors were also output.

The problem is that when the set role is reinserted, the predicted value and error change.

I specified a label as a subset in the multi-label modeling operator settings,

but I would like to know whether set-role is necessary and why the results are different.

As always, thank you for your help.

Best Answers

  • Roland Jones_21245
    Roland Jones_21245
    Altair Employee
    Answer ✓
    Hi @kimjk,

    Could you possibly post your process here so we could investigate further? You can find the xml by enabling the panel, or using File > Export Process.

    Set Role in this process is being used to set attributes to 'metadata' rather than 'label'. This is done so that the other labels specified in the Multi Label Modeling operator aren't used for predicting any of the other labels. You can see this using the Titanic example bundled with the operator. With the Set Role operator enabled, the model built to predict age gives 'The model contains 916 examples with 9 dimensions.' If we then disable the Set Role operator, you will get 'The model contains 916 examples with 11 dimensions.'

    Hope this helps,

    Best
    Roland
  • Roland Jones_21245
    Roland Jones_21245
    Altair Employee
    Answer ✓
    Hi @kimjk,

    The Set Role operator is being used to exclude other labels from being used as predictive attributes. Again using the Titanic example, we want to predict Age, Port of Embarkation, and Survived. If we don't use Set Role with all of them set to metadata, then for example Port of Embarkation and Survived are used to predict Age along with the other attributes. If we do use that Set Role step with all the labels set to 'metadata', they won't be used.

    To be clear, it's not a necessary step to use the Set Role operator here, it's just down to whether you feel it's appropriate to use the other labels to help predict.

    Best,
    Roland

Answers

  • Roland Jones_21245
    Roland Jones_21245
    Altair Employee
    Answer ✓
    Hi @kimjk,

    Could you possibly post your process here so we could investigate further? You can find the xml by enabling the panel, or using File > Export Process.

    Set Role in this process is being used to set attributes to 'metadata' rather than 'label'. This is done so that the other labels specified in the Multi Label Modeling operator aren't used for predicting any of the other labels. You can see this using the Titanic example bundled with the operator. With the Set Role operator enabled, the model built to predict age gives 'The model contains 916 examples with 9 dimensions.' If we then disable the Set Role operator, you will get 'The model contains 916 examples with 11 dimensions.'

    Hope this helps,

    Best
    Roland
  • kimjk3559
    kimjk3559 Altair Community Member
    Hi, rjones13 

    I think I know what you mean.

    Are you saying that a set role is needed to exclude the label column during training?

    This is why the accuracy actually increases after removing the set role operator.

    Thank you for your quick reply.
  • Roland Jones_21245
    Roland Jones_21245
    Altair Employee
    Answer ✓
    Hi @kimjk,

    The Set Role operator is being used to exclude other labels from being used as predictive attributes. Again using the Titanic example, we want to predict Age, Port of Embarkation, and Survived. If we don't use Set Role with all of them set to metadata, then for example Port of Embarkation and Survived are used to predict Age along with the other attributes. If we do use that Set Role step with all the labels set to 'metadata', they won't be used.

    To be clear, it's not a necessary step to use the Set Role operator here, it's just down to whether you feel it's appropriate to use the other labels to help predict.

    Best,
    Roland