We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e5de908 + 81f8ac8 commit f2ec533Copy full SHA for f2ec533
Orange/distance/distance.py
@@ -433,7 +433,9 @@ class SpearmanModel(CorrelationDistanceModel):
433
def compute_correlation(self, x1, x2):
434
if x2 is None:
435
n1 = x1.shape[1 - self.axis]
436
- if n1 == 2:
+ if n1 == 1:
437
+ rho = 1.0
438
+ elif n1 == 2:
439
# Special case to properly fill degenerate self correlations
440
# (nan, inf on the diagonals)
441
rho = stats.spearmanr(x1, x1, axis=self.axis)[0]
0 commit comments