"Generate Attribute using values of Aggregate Attributes"

svtorykh
svtorykh New Altair Community Member
edited November 2024 in Community Q&A

Hi RM team, seems to be a very basic calculation, but can't create an expression for the following scenario.

I have example set with Positivity values (positive, neutral, negative). I'm using aggregate operator to perform counts for all example set.

 

Have table as output in the following format:

Positivity(Att1) Count of Positivity (Att2)

Positive                    500

Neutral                     100

Negative                   500

 

I then need to generate another Attribute (positivity %), which needs to have a ratio value based on positive/negative values from att2.

 

What is the proper expression to use in this case?

 

Thanks!

Answers

  • MartinLiebig
    MartinLiebig
    Altair Employee

    Hi @svtorykh,

    one way to do this is to extract the number of examples before hand using Extract Macro and then simply divide by it using Generate Attributes.

     

    Best,

    Martin