Skip to main content

I have some ordered features that contain a value, and I need to identify the inflection points, ie the feature where the sign (+/-) of the attribute value changes compared to the previous feature

 

 

ex. features have values s2,3,1,-2,-1,1,3] the inflection points would be features 3 and 5

For added entertainment there is another attribute containing a common ID, and I need to break on that value.

I will give it a try:

Create a new attribute ABS with conditional value (if value = @abs(value) then Y else N).

Then create the test between the current and the previous feature (ABS = ABS(feature(-1))

That should list the changes in the Failed port of the Tester.


I will give it a try:

Create a new attribute ABS with conditional value (if value = @abs(value) then Y else N).

Then create the test between the current and the previous feature (ABS = ABS(feature(-1))

That should list the changes in the Failed port of the Tester.

I tried using an attributeCreator with the expression ((@Value(X)>=0)==(@Value(feature[-1].X)>=0)),

 

 

But I'm not sure how to prevent the first feature from one group checking against the last feature of the previous group.
I tried using an attributeCreator with the expression ((@Value(X)>=0)==(@Value(feature[-1].X)>=0)),

 

 

But I'm not sure how to prevent the first feature from one group checking against the last feature of the previous group.
In my example I would add to the Tester:

 

And group = group(feauture(-1))

 

 


I tried using an attributeCreator with the expression ((@Value(X)>=0)==(@Value(feature[-1].X)>=0)),

 

 

But I'm not sure how to prevent the first feature from one group checking against the last feature of the previous group.
Let me change that to:

 

Or group != group(feature(-1))

 

That will pass the first in each group.

 

 


Might need tweaking to handle first and last features but you probably want a conditional statement with a composite test

e.g.


Hi @jdh, if I understood the requirement correctly, this should work as expected.

[Addition] Assume that 0 won't occur in the values sequence.


Hi @jdh, if I understood the requirement correctly, this should work as expected.

cAddition] Assume that 0 won't occur in the values sequence.

0684Q00000ArLJhQAN.png

If 0 could occur in the sequence and 0 can be considered as a positive value, this Test Condition might work a treat. 

 

@Evaluate((@Value(feature<-1].value)==0 ? 1 : @Value(featureu-1].value)) * (@Value(value)==0 ? 1 : @Value(value))) < 0
If you consider 0 as a negative value, replace "1" in the expression with a negative value e.g. "-1".
If 0 could occur in the sequence and 0 can be considered as a positive value, this Test Condition might work a treat. 

 

@Evaluate((@Value(featureE-1].value)==0 ? 1 : @Value(feature=-1].value)) * (@Value(value)==0 ? 1 : @Value(value))) < 0
If you consider 0 as a negative value, replace "1" in the expression with a negative value e.g. "-1".
I believe we have to allow for 0 in the sequence, because the first feature has no prior feature and would use the default value of 0.   In that case it would ideally be neutral, so I think your first equation works as is.

 

 


Reply