From 23e9d5fbf588d5bd8527ed8c67c1b21b2d192fa1 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Wed, 30 Aug 2023 10:55:40 -0400 Subject: [PATCH 1/2] typofix in uif/uof percentiles --- internal/pkg/transformers/utils/percentile_keeper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/pkg/transformers/utils/percentile_keeper.go b/internal/pkg/transformers/utils/percentile_keeper.go index c9f2453bd3..d496abdd70 100644 --- a/internal/pkg/transformers/utils/percentile_keeper.go +++ b/internal/pkg/transformers/utils/percentile_keeper.go @@ -131,7 +131,7 @@ func (keeper *PercentileKeeper) EmitNamed(name string) *mlrval.Mlrval { } } else if name == "uif" { - p75 := keeper.EmitNonInterpolated(25.0) + p75 := keeper.EmitNonInterpolated(75.0) iqr := keeper.EmitNamed("iqr") if p75.IsNumeric() && iqr.IsNumeric() { return bifs.BIF_plus_binary(p75, bifs.BIF_times(fenceInnerK, iqr)) @@ -140,7 +140,7 @@ func (keeper *PercentileKeeper) EmitNamed(name string) *mlrval.Mlrval { } } else if name == "uof" { - p75 := keeper.EmitNonInterpolated(25.0) + p75 := keeper.EmitNonInterpolated(75.0) iqr := keeper.EmitNamed("iqr") if p75.IsNumeric() && iqr.IsNumeric() { return bifs.BIF_plus_binary(p75, bifs.BIF_times(fenceOuterK, iqr)) From 75dddc729a443f601532eea92a7d4350b164789a Mon Sep 17 00:00:00 2001 From: John Kerl Date: Wed, 30 Aug 2023 10:58:09 -0400 Subject: [PATCH 2/2] fix regression-test data --- test/cases/verb-summary/all/expout | 6 +++--- test/cases/verb-summary/exclude/expout | 6 +++--- test/cases/verb-summary/transpose-all/expout | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/cases/verb-summary/all/expout b/test/cases/verb-summary/all/expout index 06dc491d60..393eea855d 100644 --- a/test/cases/verb-summary/all/expout +++ b/test/cases/verb-summary/all/expout @@ -1,6 +1,6 @@ field_name field_type count null_count distinct_count mode sum mean stddev var skewness minlen maxlen min p25 median p75 max iqr lof lif uif uof a string 10 0 5 eks 0 - - - - 3 3 eks eks pan wye zee - - - - - b string 10 0 3 wye 0 - - - - 3 3 pan pan wye wye zee - - - - - -i int 10 0 10 1 55 5.5000 3.0277 9.1667 0.0000 1 2 1 3 6 8 10 5 -12.0000 -4.5000 10.5000 18.0000 -x float 10 0 10 0.3468 4.5363 0.4536 0.2155 0.0465 -0.5461 18 19 0.0314 0.3468 0.5271 0.5986 0.7587 0.2518 -0.4085 -0.0309 0.7244 1.1021 -y float 10 0 10 0.7268 5.9445 0.5945 0.3066 0.0940 -0.1936 17 19 0.1342 0.3383 0.7268 0.8636 0.9762 0.5253 -1.2376 -0.4496 1.1263 1.9142 +i int 10 0 10 1 55 5.5000 3.0277 9.1667 0.0000 1 2 1 3 6 8 10 5 -12.0000 -4.5000 15.5000 23.0000 +x float 10 0 10 0.3468 4.5363 0.4536 0.2155 0.0465 -0.5461 18 19 0.0314 0.3468 0.5271 0.5986 0.7587 0.2518 -0.4085 -0.0309 0.9762 1.3538 +y float 10 0 10 0.7268 5.9445 0.5945 0.3066 0.0940 -0.1936 17 19 0.1342 0.3383 0.7268 0.8636 0.9762 0.5253 -1.2376 -0.4496 1.6516 2.4395 diff --git a/test/cases/verb-summary/exclude/expout b/test/cases/verb-summary/exclude/expout index c36804f621..574eeea00f 100644 --- a/test/cases/verb-summary/exclude/expout +++ b/test/cases/verb-summary/exclude/expout @@ -1,6 +1,6 @@ field_name field_type count null_count distinct_count sum stddev var skewness minlen maxlen min p25 p75 max iqr lof lif uif uof a string 10 0 5 0 - - - 3 3 eks eks wye zee - - - - - b string 10 0 3 0 - - - 3 3 pan pan wye zee - - - - - -i int 10 0 10 55 3.0277 9.1667 0.0000 1 2 1 3 8 10 5 -12.0000 -4.5000 10.5000 18.0000 -x float 10 0 10 4.5363 0.2155 0.0465 -0.5461 18 19 0.0314 0.3468 0.5986 0.7587 0.2518 -0.4085 -0.0309 0.7244 1.1021 -y float 10 0 10 5.9445 0.3066 0.0940 -0.1936 17 19 0.1342 0.3383 0.8636 0.9762 0.5253 -1.2376 -0.4496 1.1263 1.9142 +i int 10 0 10 55 3.0277 9.1667 0.0000 1 2 1 3 8 10 5 -12.0000 -4.5000 15.5000 23.0000 +x float 10 0 10 4.5363 0.2155 0.0465 -0.5461 18 19 0.0314 0.3468 0.5986 0.7587 0.2518 -0.4085 -0.0309 0.9762 1.3538 +y float 10 0 10 5.9445 0.3066 0.0940 -0.1936 17 19 0.1342 0.3383 0.8636 0.9762 0.5253 -1.2376 -0.4496 1.6516 2.4395 diff --git a/test/cases/verb-summary/transpose-all/expout b/test/cases/verb-summary/transpose-all/expout index 8b948a500f..7b6d0699a5 100644 --- a/test/cases/verb-summary/transpose-all/expout +++ b/test/cases/verb-summary/transpose-all/expout @@ -19,5 +19,5 @@ max zee zee 10 0.7587 0.9762 iqr - - 5 0.2518 0.5253 lof - - -12.0000 -0.4085 -1.2376 lif - - -4.5000 -0.0309 -0.4496 -uif - - 10.5000 0.7244 1.1263 -uof - - 18.0000 1.1021 1.9142 +uif - - 15.5000 0.9762 1.6516 +uof - - 23.0000 1.3538 2.4395