Passing timeseries header at metric evaluation time

#1

Facts/hypotheses:

  • Fields of PointPhysicalMeasurementSeries (PPMS) are passed within the header field of the second (TSNormalizationSpec) argument to normalize.
  • When creating a PPMS header, the fields’ init values can be passed to the header constructor make, so that they are later passed to normalize method as above.

Question: Is it possible to pass the PointPhysicalMeasurementSeries fields’ init values at evalMetric* time that would override the values already taken by the PPMS header at its construction time, so that these eval-time values are passed to normalize method?

0 Likes

#2

you can remix the EvalMetricSpec and add the field you need to pass. e.g.

remix type EvalMetricSpec {
  newField: string
}
0 Likes

#3

Remix what into what? An example?
Thanks

0 Likes

#4

The requirement is to be able to use the same measurements to normalize them either as:

  • regular values, like in the default Normalizer
  • values to subtract from each other, like in RegisterNormalizer

The function normalize uses a boolean field, called differential, from its second argument’s header field (which is the PointPhysicalMeasurementSeries remixed/added field) to choose among the above two possibilities, but once the header is created, I do not know how to change temporarily this value.

If this is not possible, what is the suggested way to switch dynamically (at metric eval time) between the two desired normalizations of the same data?

0 Likes

#5

I wonder if @ts annotation could be used for this, e.g., treatmentPath field.
Or perhaps have two quantity fields with different names and treatments in @ts.

0 Likes

#6

@bachr That is a very very bad idea. You should not remix platform types. This will override behavior of the platform code in ways you will not be able to debug.

@AlexBakic you should have two fields being normalized differently for that purpose. One marked with @ts(normalizer=“RegisterNormalizer”) and other as default.

Please DO NOT remix any platform types

2 Likes