GeoDaCenter / GeoDaCenter/geoda
The question about the redcap algorithm
- Dominant language
- C++
- Stars
- 802
- Forks
- 160
- Avg merge
- 9d 21h
- Merged PRs (30d)
- 2
Description
I would like to ask a question about the REDCAP algorithm, I wrote the REDCAP algorithm according to the paper, but the calculation results seem to be different from the results of geoda, and some problems are found through comparison.
For FullOrder-AverageLinkage, my data property values are as follows:
```
[[6 5 4]
[8 9 3]
[5 9 0]
[8 7 8]
[4 7 1]]
```
The initial adjacency relation is as follows.
```
[[0.1.1.1.1.]
[1.0.1.1 1.0.]
[1.1.0.0.1.]
[1.1.0.0.0.]
[1.0.1.0.0.]]
```
I used this to cluster five nodes and set the number of clusters to two.
My code calculates the following:
`{0: [0, 4, 1, 2], 1: [3]}`
geoda calculates the following:
`{0: [0, 1, 3], 1: [2, 4]}`
I didn't know which of these calculations was correct, so I looked at the spanning tree, and I found that my algorithm built the following tree adjacency:
```
[[0.0.0.0.1.]
[0. 0. 1.
[0.1.0.0.1.]
[0.1. 0. 0.]
[1.0.1.0.0.]]
```
geoda's tree is:
```
0 5 "clusters" POLY_ID
3 5 6
5 3 6
1 2 21
21 21
1 5 17
5 1 17
1 4 24
4 1 24
```
After manual calculation, I found that according to my understanding, the results of the paper should be consistent with the results of my algorithm. May I ask if there is a problem with my calculation results? Or maybe there's something wrong in some other place that I don't understand. Thanks to the Author
Contributor guide
Assessment
This issue has not been assessed yet.