-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input to function seriate #4
Comments
The fact that correlations can be negative could influence the calculation of the TSP using ortools, but you can do something like In the docs, |
The TSP does not have a solution with negative values: we follow the corresponding cycle and reach the infinitely negative optimal loss. The triangle inequality does not have to hold, though. So I don't think that the matrix must be positively defined. |
@Guillemdb I tried the followig
This is the plot of the input data containing the correlation matrix. This is the plot of the seriated data. I could observe streaks of blue patterns. However, these streaks aren't grouped together. I expect these streaks to be grouped :( |
To me your output looks fine. Probably this is as grouped as they should be, it is normal to have this kind of results when working with such big matrices. |
@Guillemdb Many thanks for the response. Shouldn't the diagonal remain unchanged? Before seriation, I could see a yellow pattern. After seriation, the rows are sorted according to the Euclidean distance. Would it be a good idea to sort the columns as well? Since the diagonal entries of the correlation matrix are expected to exhibit high correlation, I am a bit confused. |
I came across a post on SO that suggests sorting both columns and rows of the correlation matrix. |
Hi,
In the set of comments given in seritae.py, it is mentioned that
:param dists: Either a condensed pdist-like or a symmetric square distance matrix.
Does that mean a correlation matrix shouldn't be used as input? Should the correlation matrix be
converted to a distance matrix?
The text was updated successfully, but these errors were encountered: