I just found the two output ports of Mahalanobis Distance node always generating same result table.
The configured distance output gives the result of covariance matrix.
Does this mean something wrong in my workflow? or it’s just a software problem?
Currently I’m using Distance Matrix Calculate node after Mahalanobis Distance node to get distance value for each row. But I don’t know how to convert the column type of distance vector. Distance vector is not available to use CSV writer so I hope to convert it to string or number.
you are right, one needs to follow the Mahalanobis Distance node with Distance Matrix Calculate. The latter will use the distance measure (the covariance matrix in this case) generated by the former to calculate distance values.
The two output ports of the Mahalanobis Distance node look the same in the view, however they are of different type (a table vs distance measure). Presence of both allows you to use the output to feed the Distance Matrix Calculate node as well as to dump the covariance matrix on disk in a digestible format, if desired.
The distances are stored in a collection, so to dump them into a CSV file you can first split the collection into separate columns and then send the output into a file.
I’ve created a basic example to illustrate this procedure:
Thanks for your information. It’s really helped since I may run a lot of analysis by using Mahalanobis Distance from now no. And I hope some of these analysis can be done in KNIME.
The basic example of workflow make me sure what I have tried was right, but it can be modified more simple. I will create new workflow to test the data then.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.