08-07-2016 03:37 PM
Various operators (e.g., Statistics, EigenMatrix, etc) operate on pixel values, but I want to run those operators against data selected from multiple feature attribute columns (e.g, the columns created by MeasurePolygon named M_CENTER_X and M_CENTER_Y).
I tried SelectingAttributes and Converting the AttributeTable into a Table and although the operation succeeded it appears the patient died as I only see one column of values.
I then attempted to pipe the SelectedAttributes into an Iterator that could sequentially pull the Nth item from each attribute listing, but couldn't figure out the syntax for creating a record/tuple using the 'Dynamic Table Input (List)' operator (DTIOL). I tried csv values (+w/ space delimiter), the syntax 'Float(List(2: 333 666))' (but that throws an error unless I set Count=1), and through modeling using a couple of IntInputs connected to the DTIOL's ListItem port (but it only accepted one connection). The operator doesn't have an associated dialog that I could use to build a tuple and learn the syntax, no examples in the docs or the community so I'm at a loss.
How do you run stats against multiple attribute columns like X,Y fields?
Solved! Go to Solution.
08-08-2016 07:26 AM
Some quick thoughts on this issue:
That probably doesn't help you achieve what you are trying to achieve, but at least (hopefully) indicates why the current approach isn't working.
Could you perhaps define what it is you're actually trying to do (what's the problem you're trying to solve) and that might help in coming up with some suggestions that help move you forward. Perhaps a linear regression between the two varaibles is what you're looking for?
08-08-2016 07:46 AM
As Ian said, IMAGINE tables only have one column. You can however create a Matrix with multiple columns from a set of tables. You can then compute statsistics on the matrix. Example of creating a matrix from two tables:
08-08-2016 08:05 PM
Wizardry. I tried to reproduce, but it appears my DynamicMatrixInputList node has different ports. Would you happen to have the GDMX?
I think I get what's going on though. By multiplying each vector of Nx1 values with a pair of binary 1x2 matrices [0 1] or [1 0], you're copying each vector's values into one column of an intermediate matrix while the other column is all 0. Adding combines the results.
v1 = [1 2 3]; v2 = [4 5 6]; [ 1 ] [1 0] [ 2 ] * [1 0] = [2 0] [ 3 ] [3 0] [ 4 ] [0 4] [ 5 ] * [0 1] = [0 5] [ 6 ] [0 6] [1 0] [0 4] [1 4] [2 0] + [0 5] = [2 5] [3 0] [0 6] [3 6]
08-08-2016 09:52 PM
You edited or co-authored this article where you used the EigenMatrix operator to implement PC, but sourced data from an image. I was trying to apply that technique to data sourced from feature layer attributes (e.g., ordinates), but ran into this data type/shape issue.
08-09-2016 05:46 AM - edited 08-09-2016 05:46 AM
I think what Larry has done with his Operators is right click on them and use the Add Port option to add the second item for the list. He has then hidden the Normalise port so you don't see it in the screenshot of his model. Try that - I think it should work for you,
And yes, your explanation of how the matrix algebra is intended to work is spot on.