From ad5d614f48fce0ab475e44de09deffbf4b52e2f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Grali=C5=84ski?= Date: Fri, 1 Feb 2019 12:32:56 +0100 Subject: [PATCH] Filter out NaN values so that sorting is not poisoned --- src/GEval/LineByLine.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/GEval/LineByLine.hs b/src/GEval/LineByLine.hs index 098a408..e63419e 100644 --- a/src/GEval/LineByLine.hs +++ b/src/GEval/LineByLine.hs @@ -97,6 +97,7 @@ runWorstFeatures ordering spec bbdo = runLineByLineGeneralized ordering' spec (w worstFeaturesPipeline :: Bool -> GEvalSpecification -> BlackBoxDebuggingOptions -> ConduitT LineRecord Void (ResourceT IO) () worstFeaturesPipeline reversed spec bbdo = rank (lessByMetric reversed $ gesMainMetric spec) .| evalStateC 0 (extractFeaturesAndPValues spec bbdo) + .| CC.filter (\(FeatureWithPValue _ p _ _) -> not $ isNaN p) -- NaN values would poison sorting .| gobbleAndDo (sortBy featureOrder) .| filtreCartesian (bbdoCartesian bbdo) .| CL.map (encodeUtf8 . formatFeatureWithPValue)