From d5d58dd966d551c2ab8db810e1f060280d410c96 Mon Sep 17 00:00:00 2001 From: Klaus Eckelt Date: Thu, 7 Mar 2019 10:01:17 +0100 Subject: [PATCH] Fix bug in attribute Chi2 Test if one attribute has only one category Caleydo/tdp_bi_bioinfodb#956 --- src/Measures.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Measures.ts b/src/Measures.ts index 90cb530..48d57de 100644 --- a/src/Measures.ts +++ b/src/Measures.ts @@ -183,7 +183,7 @@ export class ChiSquareIndependenceTest extends ChiSquareTest { let score = 0; let pValue = -1; - if (rows <= 1 && columns <= 1) { + if (rows <= 1 || columns <= 1) { return measureResultObj(score, pValue); }