Solved

Get the difference between each feature value (small dataset)

  • 12 July 2019
  • 4 replies
  • 16 views

Badge +4

I want to take a small data set like the one below and calculate the difference between each feature as either a matrix or as a 1:1 readout

Input

Matrix output

Paired output

the goal would be then to use this data to evaluate a matrix of points to determine their proximity in relationship of the nodes for the given point

icon

Best answer by ebygomm 17 July 2019, 09:24

View original

4 replies

Userlevel 4
Badge +13

Hi @jnotter The FeatureJoiner is great for comparing features together. I'd also recommend renaming the attributes for the Left or Right port. See https://hub.safe.com/publishers/safe-lab/templates/pair-every-feature for reference.

Userlevel 1
Badge +21

Either option is possible.

 

The matrix option is a bit more complicated as would either require amending to expose the node names as attributes or doing this dynamically. What format would you want to write back to.

I've attached a quick example

difference_between_features.fmwt

Badge +4

Either option is possible.

 

The matrix option is a bit more complicated as would either require amending to expose the node names as attributes or doing this dynamically. What format would you want to write back to.

I've attached a quick example

difference_between_features.fmwt

I couldn't tell from the transformers how you made the Cartesian join successful, but your FMWT worked as designed once I made my input match your input structure.

Badge +4

Hi @jnotter The FeatureJoiner is great for comparing features together. I'd also recommend renaming the attributes for the Left or Right port. See https://hub.safe.com/publishers/safe-lab/templates/pair-every-feature for reference.

Feature Joiner requires a "Join On" criteria. Essentially this needs a Cartesian join, and thus why the dataset must remain small in order for this to work.

Reply