Skip to main content
Solved

Get the difference between each feature value (small dataset)


jnotter
Contributor
Forum|alt.badge.img+5

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

Best answer by ebygomm

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

View original
Did this help you find an answer to your question?

4 replies

fmelizard
Safer
Forum|alt.badge.img+18
  • Safer
  • July 16, 2019

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.


ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • Best Answer
  • July 17, 2019

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


jnotter
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • July 26, 2019
ebygomm wrote:

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.


jnotter
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • July 29, 2019
fmelizard wrote:

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings