From 2a715170c762e6f1fcdc088623cdf231cf43bdb2 Mon Sep 17 00:00:00 2001 From: Alex Mason Date: Mon, 6 May 2024 16:25:02 +1000 Subject: [PATCH] Use longer vectors to avoid NaNs, check separated vectors --- test/Spec.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Spec.hs b/test/Spec.hs index a49c9fe..cbbf8f5 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -187,9 +187,9 @@ main = defaultMain $ QC.counterexample ("Correlation: " ++ show corr ++ " Stats: " ++ show (m1,m2,s1,s2)) $ between (-1,1) corr || isNaN corr , QC.testProperty "LinRegState Semigroup" $ \v1 v2 -> - U.length v1 > 2 && U.length v2 > 2 - && U.any (/=0.0) (U.map fst (mappend v1 v1)) - && U.any (/=0.0) (U.map snd (mappend v1 v1)) ==> let + U.length v1 > 3 && U.length v2 > 3 + && U.any (/=0.0) (U.map fst v1) && U.any (/=0.0) (U.map fst v2) + && U.any (/=0.0) (U.map snd v1) && U.any (/=0.0) (U.map snd v2) ==> let sep = getLinRegResult $ F.fold foldLinRegState (U.toList v1) <> F.fold foldLinRegState (U.toList v2) tog = F.fold fastLinearReg (U.toList v1 ++ U.toList v2) in (cmpLMVSK precision (lrrXStats sep) (lrrXStats tog)