Skip to content

Commit

Permalink
Typofix in uif/uof percentiles (#1375)
Browse files Browse the repository at this point in the history
* typofix in uif/uof percentiles

* fix regression-test data
  • Loading branch information
johnkerl authored Aug 30, 2023
1 parent 2fd353c commit 879f272
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions internal/pkg/transformers/utils/percentile_keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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))
Expand Down
6 changes: 3 additions & 3 deletions test/cases/verb-summary/all/expout
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions test/cases/verb-summary/exclude/expout
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions test/cases/verb-summary/transpose-all/expout
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 879f272

Please sign in to comment.