Skip to content

Data Modification with Multiple Labels #99

Answered by WeisLeDocto
joshuatbland asked this question in Q&A
Discussion options

You must be logged in to vote

Hi !

It all depends if the labels come from a same Block, or from different ones.

  • If they come from a same Block, it is possible to perform any operation on all the labels at once. Basic example:

    class MyModifier(crappy.modifier.Modifier):
        def __call__(self, data):
            data['avg'] = 0.5 * (data['label_1'] + data['label_2'])
            return data
  • If they come from different Blocks, things get much trickier and there is no universal answer. What's for sure is that a Modifier alone cannot do the job, a Block needs to be used. In the general case, the labels will not be generated in a synchronized way by the several Blocks, so it's impossible to define operations to compute at every…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@joshuatbland
Comment options

Answer selected by joshuatbland
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants