-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spike1 #295
Open
jrossthomson
wants to merge
140
commits into
GoogleCloudPlatform:master
Choose a base branch
from
jrossthomson:spike1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Spike1 #295
Changes from all commits
Commits
Show all changes
140 commits
Select commit
Hold shift + click to select a range
288897f
First pass at adding Statslib
jrossthomson a2b6348
Merge branch 'master' of https://github.com/jrossthomson/bigquery-uti…
jrossthomson 2705f30
Interim update.
jrossthomson 3321b42
Fixed KW test cases.
jrossthomson 23c8491
Merge branch 'statslib'
jrossthomson 757d08b
Fixed kw.
jrossthomson 2625f15
Added Linear Regression
jrossthomson 7270810
Merge branch 'statslib'
jrossthomson d9b33a8
Merge remote-tracking branch 'upstream/master'
jrossthomson 4be0d71
Merge branch 'master' into master
jrossthomson c6ad383
Merge remote-tracking branch 'upstream/master'
imathews aa18c13
Use jstat from bq_js_libs
imathews 9a63ff2
fix typo
imathews 65279b5
Update kruskal_wallis.sql
jrossthomson 8cc1879
Update linear_regression.sql
jrossthomson ddd43ad
Merge branch 'master' into master
jrossthomson 21ced84
Update udfs/statslib/pvalue.sql
jrossthomson 04acaa4
Delete .init
jrossthomson 568cb96
Update .gitignore
jrossthomson d18cd99
Merge branch 'master' of https://github.com/jrossthomson/bigquery-utils
drj-ross 9570dcb
Update udfs/statslib/kruskal_wallis.sql
jrossthomson 14cad12
Update udfs/statslib/pvalue.sql
jrossthomson 2470574
Update udfs/statslib/linear_regression.sql
jrossthomson 076d9a3
Update udfs/statslib/kruskal_wallis.sql
jrossthomson 43f066d
Update udf_test_utils.py
jrossthomson c738145
reverted file
drj-ross 0229cf0
Merge branch 'master' of https://github.com/jrossthomson/bigquery-utils
drj-ross 8457323
Delete key.json
jrossthomson bbc53a8
Moved statslib to community
drj-ross b6d337d
Merge branch 'master' of https://github.com/jrossthomson/bigquery-utils
drj-ross f7c6d77
trying to revert again
drj-ross d4cc039
fixed newline
drj-ross 6705fc5
Delete BigQueryUtils.code-workspace
jrossthomson c668b7f
Update udfs/community/pvalue.sql
jrossthomson befd864
Update udfs/community/linear_regression.sql
jrossthomson ad2accc
Update udfs/community/linear_regression.sql
jrossthomson 00690a9
Update udfs/community/kruskal_wallis.sql
jrossthomson 4b54467
Update udfs/community/README.md
jrossthomson b22b52e
Update udfs/community/README.md
jrossthomson bd0c6dd
Update udfs/community/README.md
jrossthomson 6095ed2
Update README.md
jrossthomson 67d21f1
Update README.md
jrossthomson d294925
Update README.md
jrossthomson dbac294
Update test_cases.yaml
jrossthomson c4f90ed
Merge branch 'master' into master
danieldeleo 9d762e4
Function to compute p-values from correlations
boaguilar 6d89173
Additional UDFs
boaguilar 844e020
fix(test): handle jslibs bundling, reference in local testing
imathews 18e81c7
Merge branch 'master' into fix-jslibs_testing
imathews 78162c4
Merge pull request #5 from jrossthomson/fix-jslibs_testing
jrossthomson 11efd37
Adding info about testing js_libs locally.
drj-ross 6136a96
Merge branch 'statslib-boris' into add-boris
drj-ross ac48d5a
Removed typo
drj-ross d56baa5
fix(tests): remove NaN test, property reference for JS methods
imathews 6b34d8b
isb-cgc functions fixed
boaguilar fd4c19d
feat: implement jstat_udf
imathews 73575a3
Merge branch 'GoogleCloudPlatform:master' into add-boris
jrossthomson 6413d21
Merge pull request #8 from jrossthomson/feat-jstat_udf
jrossthomson 503e017
Merge pull request #1 from jrossthomson/statslib-boris
jrossthomson 8846916
Merge branch 'master' into add-boris
jrossthomson 369f0fd
Merge pull request #9 from jrossthomson/add-boris
jrossthomson f230b4e
Trying to fix mann_whitney and normal_cdf
drj-ross 60f8868
Merge pull request #10 from jrossthomson/ross
jrossthomson d31de79
Added t_test; Student's T
drj-ross e0f42e2
Added T test to docs.
drj-ross 5699b1b
Renamed pvalue.sql to chisquare_cdf
drj-ross b4e7d94
wip: implement basic piping for chi-square
imathews a6b902b
fix: use string concatenation to return proper chi-square results
imathews ccc349d
feat: add linear_regression stored procedure
imathews 8c38aa6
Merge pull request #13 from jrossthomson/ross
jrossthomson bd9c943
implement assertions in unit tests, finalize argument signature
imathews 892016a
Merge branch 'master' into feat-chi_square_procedure
imathews f28951e
Merge pull request #14 from jrossthomson/feat-chi_square_procedure
jrossthomson a6a5682
feat: implement bh_multiple_tests
imathews 2c44d79
feat: pass temp_table_name parameter to bh_multiple_tests
imathews a5a5886
Merge pull request #15 from jrossthomson/feat-BH_multi_test_stored_proc
jrossthomson 3b0e045
Documentation for new procedures
boaguilar c1303f0
Merge pull request #16 from jrossthomson/boaguilar-documentation
jrossthomson 4be3705
Remove commenting of line in run.sh
jrossthomson 00cfa80
Merge remote-tracking branch 'upstream/master'
jrossthomson 402266f
Updated sql files to be sqlx
jrossthomson ec5f181
Added fix to man
jrossthomson ce741b4
pvalue to chi_square_cdf fixes
jrossthomson e2b898d
fixed test case
jrossthomson ea03c46
Merge remote-tracking branch 'upstream/master'
jrossthomson 55e03e8
Update udfs/community/t_test.sqlx
jrossthomson 70d83c8
Update udfs/community/t_test.sqlx
jrossthomson 9e3716c
Update udfs/community/p_fisherexact.sqlx
jrossthomson 021a623
Update udfs/community/p_fisherexact.sqlx
jrossthomson 6a77652
Update udfs/community/p_fisherexact.sqlx
jrossthomson 7823f31
Update udfs/community/p_fisherexact.sqlx
jrossthomson e713b91
Update udfs/community/p_fisherexact.sqlx
jrossthomson 093a50a
Delete cloudbuild_js_libs.yaml
jrossthomson 0a543b5
Merge branch 'master' of https://github.com/jrossthomson/bigquery-utils
jrossthomson defd086
Added MannWhitney and Fisher tests.
jrossthomson ab7a8f3
Update README.md
boaguilar 9d0268e
Update README.md
boaguilar 9babfd0
Update README.md
boaguilar 3fdc93b
test of statistical udfs
boaguilar 2d05271
updated udf
boaguilar c5dc8ea
Merge pull request #18 from jrossthomson/boris-udfs
jrossthomson 2ff252c
Update stored_procedures/bh_multiple_tests.sql
jrossthomson ecc2876
Update udfs/community/t_test.sqlx
jrossthomson 5e14246
Update udfs/community/p_fisherexact.sqlx
jrossthomson 118ae00
Update udfs/community/normal_cdf.sqlx
jrossthomson d3fee52
Update udfs/community/mannwhitneyu.sqlx
jrossthomson 7598414
Update udfs/community/kruskal_wallis.sqlx
jrossthomson 1dc1697
Update udfs/community/jstat.sqlx
jrossthomson 73e5c8a
Update udfs/community/corr_pvalue.sqlx
jrossthomson e841e67
Update udfs/community/chisquare_cdf.sqlx
jrossthomson 056cd55
Update stored_procedures/linear_regression.sql
jrossthomson fcce830
Update stored_procedures/chi_square.sql
jrossthomson 72db4f5
Added license header
jrossthomson 82e6229
Added linear regression
jrossthomson 5321ad1
fixed index links.
jrossthomson 7eb70f5
fixed index names
jrossthomson 7ee7333
Added Unit tests.
jrossthomson 663ce64
Fixed Link
jrossthomson 24cc148
Fixed function name.
jrossthomson cd5bead
Reinstating t-test
jrossthomson 18c5eea
Fixed link normal_cdf
jrossthomson 3df1af1
Merge branch 'master' into master
danieldeleo 13ef72e
trailing newline
danieldeleo faf5a9a
Merge branch 'GoogleCloudPlatform:master' into master
jrossthomson 5efa96b
Anova created.
jrossthomson 46406ab
Merge branch 'master' of https://github.com/jrossthomson/bigquery-utils
jrossthomson bf2b246
feat: implement t-test paired stored proc
imathews 7e81768
feat: t_tests
imathews dbbeeca
Merge pull request #27 from jrossthomson/feat-t_test_stored_proc
jrossthomson a8448c0
added testing version of ANOVA
jrossthomson 9eb551f
Merge branch 'master' of https://github.com/jrossthomson/bigquery-utils
jrossthomson cd9fb06
commented out config temporarily
jrossthomson 0c20220
Added Anova. Trying to get testing to go through.
jrossthomson 1d814d3
Merge branch 'master' of https://github.com/GoogleCloudPlatform/bigqu…
jrossthomson 7343a6b
Merge branch 'GoogleCloudPlatform-master'
jrossthomson 59bb000
Added Anova f test
jrossthomson 5dba308
test
jrossthomson a3fce9b
Working anova f test
jrossthomson 1a5facb
added anovaftest
jrossthomson 9c53365
updated link addresses
jrossthomson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,224 @@ | ||
/* | ||
* Copyright 2021 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
-- @param STRING pop1_table table name (or subquery) that contains the first population | ||
-- @param STRING pop1_variable name of the measurement column in our first table | ||
-- @param STRING pop2_table table name (or subquery) that contains the second population | ||
-- @param STRING pop2_variable name of the measurement column in our second table | ||
-- @return STRUCT<t_value FLOAT64, dof FLOAT64, p_value FLOAT64> | ||
|
||
CREATE OR REPLACE PROCEDURE bqutil.procedure.t_test(pop1_table STRING, pop1_variable STRING, pop2_table STRING, pop2_variable STRING, OUT result STRUCT<t_value FLOAT64, dof FLOAT64, p_value FLOAT64> ) | ||
BEGIN | ||
EXECUTE IMMEDIATE """ | ||
WITH pop1 AS ( | ||
SELECT `""" || pop1_variable || """` AS value | ||
FROM """ || pop1_table ||""" | ||
), pop2 as ( | ||
SELECT `""" || pop2_variable || """` AS value | ||
FROM """ || pop2_table || """ | ||
) | ||
SELECT STRUCT( | ||
ABS(x1 - x2) / Sqrt((st1 * st1 / n1) + (st2 * st2 / n2)) AS t_value, | ||
n1 + n2 - 2 AS dof, | ||
bqutil.fn.pvalue(ABS(x1 - x2) / Sqrt((st1 * st1 / n1) + (st2 * st2 / n2)), n1 + n2 - 2) AS p_value | ||
) | ||
FROM ( | ||
SELECT | ||
AVG(value) x1, | ||
STDDEV(value) st1, | ||
COUNT(value) AS n1 | ||
FROM pop1 | ||
) | ||
CROSS JOIN | ||
( | ||
SELECT | ||
AVG(value) x2, | ||
STDDEV(value) st2, | ||
COUNT(value) AS n2 | ||
FROM pop2 | ||
) | ||
""" INTO result; | ||
END; | ||
|
||
-- a unit test of t_test_paired | ||
BEGIN | ||
DECLARE result STRUCT<t_value FLOAT64, dof FLOAT64, p_value FLOAT64>; | ||
CREATE TEMP TABLE iris (sepal_length FLOAT64, sepal_width FLOAT64, petal_length FLOAT64, petal_width FLOAT64, species STRING) | ||
AS | ||
SELECT 5.1 AS sepal_length, | ||
3.5 AS sepal_width, | ||
1.4 AS petal_length, | ||
0.2 AS petal_width, | ||
'setosa' AS species | ||
UNION ALL SELECT 4.9,3.0,1.4,0.2,'setosa' | ||
UNION ALL SELECT 4.7,3.2,1.3,0.2,'setosa' | ||
UNION ALL SELECT 4.6,3.1,1.5,0.2,'setosa' | ||
UNION ALL SELECT 5.0,3.6,1.4,0.2,'setosa' | ||
UNION ALL SELECT 5.4,3.9,1.7,0.4,'setosa' | ||
UNION ALL SELECT 4.6,3.4,1.4,0.3,'setosa' | ||
UNION ALL SELECT 5.0,3.4,1.5,0.2,'setosa' | ||
UNION ALL SELECT 4.4,2.9,1.4,0.2,'setosa' | ||
UNION ALL SELECT 4.9,3.1,1.5,0.1,'setosa' | ||
UNION ALL SELECT 5.4,3.7,1.5,0.2,'setosa' | ||
UNION ALL SELECT 4.8,3.4,1.6,0.2,'setosa' | ||
UNION ALL SELECT 4.8,3.0,1.4,0.1,'setosa' | ||
UNION ALL SELECT 4.3,3.0,1.1,0.1,'setosa' | ||
UNION ALL SELECT 5.8,4.0,1.2,0.2,'setosa' | ||
UNION ALL SELECT 5.7,4.4,1.5,0.4,'setosa' | ||
UNION ALL SELECT 5.4,3.9,1.3,0.4,'setosa' | ||
UNION ALL SELECT 5.1,3.5,1.4,0.3,'setosa' | ||
UNION ALL SELECT 5.7,3.8,1.7,0.3,'setosa' | ||
UNION ALL SELECT 5.1,3.8,1.5,0.3,'setosa' | ||
UNION ALL SELECT 5.4,3.4,1.7,0.2,'setosa' | ||
UNION ALL SELECT 5.1,3.7,1.5,0.4,'setosa' | ||
UNION ALL SELECT 4.6,3.6,1.0,0.2,'setosa' | ||
UNION ALL SELECT 5.1,3.3,1.7,0.5,'setosa' | ||
UNION ALL SELECT 4.8,3.4,1.9,0.2,'setosa' | ||
UNION ALL SELECT 5.0,3.0,1.6,0.2,'setosa' | ||
UNION ALL SELECT 5.0,3.4,1.6,0.4,'setosa' | ||
UNION ALL SELECT 5.2,3.5,1.5,0.2,'setosa' | ||
UNION ALL SELECT 5.2,3.4,1.4,0.2,'setosa' | ||
UNION ALL SELECT 4.7,3.2,1.6,0.2,'setosa' | ||
UNION ALL SELECT 4.8,3.1,1.6,0.2,'setosa' | ||
UNION ALL SELECT 5.4,3.4,1.5,0.4,'setosa' | ||
UNION ALL SELECT 5.2,4.1,1.5,0.1,'setosa' | ||
UNION ALL SELECT 5.5,4.2,1.4,0.2,'setosa' | ||
UNION ALL SELECT 4.9,3.1,1.5,0.1,'setosa' | ||
UNION ALL SELECT 5.0,3.2,1.2,0.2,'setosa' | ||
UNION ALL SELECT 5.5,3.5,1.3,0.2,'setosa' | ||
UNION ALL SELECT 4.9,3.1,1.5,0.1,'setosa' | ||
UNION ALL SELECT 4.4,3.0,1.3,0.2,'setosa' | ||
UNION ALL SELECT 5.1,3.4,1.5,0.2,'setosa' | ||
UNION ALL SELECT 5.0,3.5,1.3,0.3,'setosa' | ||
UNION ALL SELECT 4.5,2.3,1.3,0.3,'setosa' | ||
UNION ALL SELECT 4.4,3.2,1.3,0.2,'setosa' | ||
UNION ALL SELECT 5.0,3.5,1.6,0.6,'setosa' | ||
UNION ALL SELECT 5.1,3.8,1.9,0.4,'setosa' | ||
UNION ALL SELECT 4.8,3.0,1.4,0.3,'setosa' | ||
UNION ALL SELECT 5.1,3.8,1.6,0.2,'setosa' | ||
UNION ALL SELECT 4.6,3.2,1.4,0.2,'setosa' | ||
UNION ALL SELECT 5.3,3.7,1.5,0.2,'setosa' | ||
UNION ALL SELECT 5.0,3.3,1.4,0.2,'setosa' | ||
UNION ALL SELECT 7.0,3.2,4.7,1.4,'versicolor' | ||
UNION ALL SELECT 6.4,3.2,4.5,1.5,'versicolor' | ||
UNION ALL SELECT 6.9,3.1,4.9,1.5,'versicolor' | ||
UNION ALL SELECT 5.5,2.3,4.0,1.3,'versicolor' | ||
UNION ALL SELECT 6.5,2.8,4.6,1.5,'versicolor' | ||
UNION ALL SELECT 5.7,2.8,4.5,1.3,'versicolor' | ||
UNION ALL SELECT 6.3,3.3,4.7,1.6,'versicolor' | ||
UNION ALL SELECT 4.9,2.4,3.3,1.0,'versicolor' | ||
UNION ALL SELECT 6.6,2.9,4.6,1.3,'versicolor' | ||
UNION ALL SELECT 5.2,2.7,3.9,1.4,'versicolor' | ||
UNION ALL SELECT 5.0,2.0,3.5,1.0,'versicolor' | ||
UNION ALL SELECT 5.9,3.0,4.2,1.5,'versicolor' | ||
UNION ALL SELECT 6.0,2.2,4.0,1.0,'versicolor' | ||
UNION ALL SELECT 6.1,2.9,4.7,1.4,'versicolor' | ||
UNION ALL SELECT 5.6,2.9,3.6,1.3,'versicolor' | ||
UNION ALL SELECT 6.7,3.1,4.4,1.4,'versicolor' | ||
UNION ALL SELECT 5.6,3.0,4.5,1.5,'versicolor' | ||
UNION ALL SELECT 5.8,2.7,4.1,1.0,'versicolor' | ||
UNION ALL SELECT 6.2,2.2,4.5,1.5,'versicolor' | ||
UNION ALL SELECT 5.6,2.5,3.9,1.1,'versicolor' | ||
UNION ALL SELECT 5.9,3.2,4.8,1.8,'versicolor' | ||
UNION ALL SELECT 6.1,2.8,4.0,1.3,'versicolor' | ||
UNION ALL SELECT 6.3,2.5,4.9,1.5,'versicolor' | ||
UNION ALL SELECT 6.1,2.8,4.7,1.2,'versicolor' | ||
UNION ALL SELECT 6.4,2.9,4.3,1.3,'versicolor' | ||
UNION ALL SELECT 6.6,3.0,4.4,1.4,'versicolor' | ||
UNION ALL SELECT 6.8,2.8,4.8,1.4,'versicolor' | ||
UNION ALL SELECT 6.7,3.0,5.0,1.7,'versicolor' | ||
UNION ALL SELECT 6.0,2.9,4.5,1.5,'versicolor' | ||
UNION ALL SELECT 5.7,2.6,3.5,1.0,'versicolor' | ||
UNION ALL SELECT 5.5,2.4,3.8,1.1,'versicolor' | ||
UNION ALL SELECT 5.5,2.4,3.7,1.0,'versicolor' | ||
UNION ALL SELECT 5.8,2.7,3.9,1.2,'versicolor' | ||
UNION ALL SELECT 6.0,2.7,5.1,1.6,'versicolor' | ||
UNION ALL SELECT 5.4,3.0,4.5,1.5,'versicolor' | ||
UNION ALL SELECT 6.0,3.4,4.5,1.6,'versicolor' | ||
UNION ALL SELECT 6.7,3.1,4.7,1.5,'versicolor' | ||
UNION ALL SELECT 6.3,2.3,4.4,1.3,'versicolor' | ||
UNION ALL SELECT 5.6,3.0,4.1,1.3,'versicolor' | ||
UNION ALL SELECT 5.5,2.5,4.0,1.3,'versicolor' | ||
UNION ALL SELECT 5.5,2.6,4.4,1.2,'versicolor' | ||
UNION ALL SELECT 6.1,3.0,4.6,1.4,'versicolor' | ||
UNION ALL SELECT 5.8,2.6,4.0,1.2,'versicolor' | ||
UNION ALL SELECT 5.0,2.3,3.3,1.0,'versicolor' | ||
UNION ALL SELECT 5.6,2.7,4.2,1.3,'versicolor' | ||
UNION ALL SELECT 5.7,3.0,4.2,1.2,'versicolor' | ||
UNION ALL SELECT 5.7,2.9,4.2,1.3,'versicolor' | ||
UNION ALL SELECT 6.2,2.9,4.3,1.3,'versicolor' | ||
UNION ALL SELECT 5.1,2.5,3.0,1.1,'versicolor' | ||
UNION ALL SELECT 5.7,2.8,4.1,1.3,'versicolor' | ||
UNION ALL SELECT 6.3,3.3,6.0,2.5,'virginica' | ||
UNION ALL SELECT 5.8,2.7,5.1,1.9,'virginica' | ||
UNION ALL SELECT 7.1,3.0,5.9,2.1,'virginica' | ||
UNION ALL SELECT 6.3,2.9,5.6,1.8,'virginica' | ||
UNION ALL SELECT 6.5,3.0,5.8,2.2,'virginica' | ||
UNION ALL SELECT 7.6,3.0,6.6,2.1,'virginica' | ||
UNION ALL SELECT 4.9,2.5,4.5,1.7,'virginica' | ||
UNION ALL SELECT 7.3,2.9,6.3,1.8,'virginica' | ||
UNION ALL SELECT 6.7,2.5,5.8,1.8,'virginica' | ||
UNION ALL SELECT 7.2,3.6,6.1,2.5,'virginica' | ||
UNION ALL SELECT 6.5,3.2,5.1,2.0,'virginica' | ||
UNION ALL SELECT 6.4,2.7,5.3,1.9,'virginica' | ||
UNION ALL SELECT 6.8,3.0,5.5,2.1,'virginica' | ||
UNION ALL SELECT 5.7,2.5,5.0,2.0,'virginica' | ||
UNION ALL SELECT 5.8,2.8,5.1,2.4,'virginica' | ||
UNION ALL SELECT 6.4,3.2,5.3,2.3,'virginica' | ||
UNION ALL SELECT 6.5,3.0,5.5,1.8,'virginica' | ||
UNION ALL SELECT 7.7,3.8,6.7,2.2,'virginica' | ||
UNION ALL SELECT 7.7,2.6,6.9,2.3,'virginica' | ||
UNION ALL SELECT 6.0,2.2,5.0,1.5,'virginica' | ||
UNION ALL SELECT 6.9,3.2,5.7,2.3,'virginica' | ||
UNION ALL SELECT 5.6,2.8,4.9,2.0,'virginica' | ||
UNION ALL SELECT 7.7,2.8,6.7,2.0,'virginica' | ||
UNION ALL SELECT 6.3,2.7,4.9,1.8,'virginica' | ||
UNION ALL SELECT 6.7,3.3,5.7,2.1,'virginica' | ||
UNION ALL SELECT 7.2,3.2,6.0,1.8,'virginica' | ||
UNION ALL SELECT 6.2,2.8,4.8,1.8,'virginica' | ||
UNION ALL SELECT 6.1,3.0,4.9,1.8,'virginica' | ||
UNION ALL SELECT 6.4,2.8,5.6,2.1,'virginica' | ||
UNION ALL SELECT 7.2,3.0,5.8,1.6,'virginica' | ||
UNION ALL SELECT 7.4,2.8,6.1,1.9,'virginica' | ||
UNION ALL SELECT 7.9,3.8,6.4,2.0,'virginica' | ||
UNION ALL SELECT 6.4,2.8,5.6,2.2,'virginica' | ||
UNION ALL SELECT 6.3,2.8,5.1,1.5,'virginica' | ||
UNION ALL SELECT 6.1,2.6,5.6,1.4,'virginica' | ||
UNION ALL SELECT 7.7,3.0,6.1,2.3,'virginica' | ||
UNION ALL SELECT 6.3,3.4,5.6,2.4,'virginica' | ||
UNION ALL SELECT 6.4,3.1,5.5,1.8,'virginica' | ||
UNION ALL SELECT 6.0,3.0,4.8,1.8,'virginica' | ||
UNION ALL SELECT 6.9,3.1,5.4,2.1,'virginica' | ||
UNION ALL SELECT 6.7,3.1,5.6,2.4,'virginica' | ||
UNION ALL SELECT 6.9,3.1,5.1,2.3,'virginica' | ||
UNION ALL SELECT 5.8,2.7,5.1,1.9,'virginica' | ||
UNION ALL SELECT 6.8,3.2,5.9,2.3,'virginica' | ||
UNION ALL SELECT 6.7,3.3,5.7,2.5,'virginica' | ||
UNION ALL SELECT 6.7,3.0,5.2,2.3,'virginica' | ||
UNION ALL SELECT 6.3,2.5,5.0,1.9,'virginica' | ||
UNION ALL SELECT 6.5,3.0,5.2,2.0,'virginica' | ||
UNION ALL SELECT 6.2,3.4,5.4,2.3,'virginica' | ||
UNION ALL SELECT 5.9,3.0,5.1,1.8,'virginica'; | ||
|
||
|
||
CALL bqutil.procedure.t_test('iris', 'sepal_width', 'iris', 'petal_width', result); | ||
|
||
-- We round to 11 decimals here because there appears to be some inconsistency in the function, likely due to floating point errors and the order of aggregation | ||
ASSERT ROUND(result.t_value, 11) = 25.88834390257; | ||
ASSERT result.dof = 298; | ||
ASSERT result.p_value = 1.0; | ||
END; | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update all other new files as well to 2022