How do i aggregate per Attribute where value of row is 1?

Milosss
Milosss New Altair Community Member
edited November 2024 in Community Q&A
Hello all together!
I got a csv file which contains this:

i need to count the number of 1 per attribute. I had an Idea to first filter for every attribute = 1 and then to aggregate each attribute with count, but with 110 attributes this could take a while. 
Does anybody have an Idea how to speed up this process? 

Answers

  • jacobcybulski
    jacobcybulski New Altair Community Member
    I assume you need to create sums of all (great many) attributes (which happen to be 0 or 1). One way can be to use a Loop Attributes operator, which is able to perform operations on all selected attributes. Within the looping operator place the Aggregate but for the aggregation attribute enter %{loop_attribute} and a sum, which will be replaced by the attribute name, loop goes through. The Loop Attributes then produces a large number of separate example sets of one attribute each. These can be merged into a single example set using Merge Attributes from the Operator Toolbox extension. If you need to select only certain types of attributes for this processing, or to exclude a few, this can be done at the Loop Attributes operator and its attribute filter, to include or exclude special attributes, etc.

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.