From 6fcc97ef01cfb2629f0514d60ecdc4104491bffa Mon Sep 17 00:00:00 2001 From: Anton Nesterov Date: Fri, 4 Oct 2024 07:24:07 +0200 Subject: [PATCH] add notebook deps, exclude for lsp --- bun.lockb | Bin 6793 -> 53492 bytes deno.json | 5 +- notebooks/data_analytics_js.ipynb | 338 +++++++++++++----------------- package.json | 6 +- shapiro.ts | 306 --------------------------- 5 files changed, 151 insertions(+), 504 deletions(-) delete mode 100644 shapiro.ts diff --git a/bun.lockb b/bun.lockb index d493c2cf5a987a59983cc790633a4f959f2849c8..a619f29fac9f738a70246eb78ffd1f8b8668f72f 100755 GIT binary patch literal 53492 zcmeHw30O^C^!F_n6^T+3X_O4NnFf_8DIp<|id)?#)vbGP6G;@JB10rY%9KnQNRx(Jm>e^qaLuv*u=cy{>JFo4ZS{ zTmSb>#db??$tw;?(K2^0gF+CN@*|qaZ*im`{gu2R(o!^9q$OO5LLAKUWMbwxsIC{J z-w5)b3(;s2kapK)FgYA%*sL!6@}-b32KgT$Mm*?w-hM1vHRvTFeH&urfqXZ%FPj4~ z*Ny4RitEbH4}=(TMt~QGI3D625IYItv~K)*x!w8Yk|2%sy@xc$hR{T;hsV(yg?0nK zJ2#j{35E{y`{&=}!=2d1FZQfmj*zeIdRL_6XX~ z^CG&x_U{^l1M%&?Ap0#MoXZXbhIG0vj-HgfzAfaGoqSVJG^DBQB`_DwM;1 z_yAzU{}9x7R1ohJ#BRO$b|pa??TvyM?G1t$addD7+JXIuHBA%fpc}uA$CC@Tu%Xe|{&^6i{WBm&UMoSoN18_K2k9*kBhOlh(T;c-e$2vN zX1cT7e7%FbfzJdAqn{!n#_~lFqd#P2`Q^j34g8@PjmP!%c7^x|h&<>GA;xm5ax~gN zh(#eD0C8=98f_57S0To7#~}t){mJ6Fd1<$#-MnCWLB1;|i0cJ0Gt`@lz9Gun4d&ywLyYZy3NhA`D9DFl zL6p-@;b`1X-n{96k#hO$h9QTybmgfpS+4o*hWff;57rNCdfV5gX1C$ZBN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GCeFF@b`+j)#DDJIpAPy=9F)E_O7OglR4CJvOYl_1{4WC+cO$AvqByE@fg- z2Xn{rss>Mw&Y-{%do`?2R)SL2nH$TxEfEchTM8~`iDxb>`OKY#vG5pFtZ0JOEWLxY zIF8v8>=D^=3}-^iIdpKM&j3Sx#RBWHokz`EA1L`)j>SpRPQY|SC=9og^)_7hyM7U# znv9~wXd)!saBcR=`04YD`O%p<0$mvD!*y7PRuA;HEf1DgMIF{~hV}5{O-r_Kom2aw zGkOXO7#eQ+z^q~ai`M1$QHO9FU+|xN)|d1-lcSh`6Pjd=MNR$FN+H953o<}E&u=k diff --git a/deno.json b/deno.json index 08f662a..41d7226 100644 --- a/deno.json +++ b/deno.json @@ -2,5 +2,8 @@ "tasks": { }, "imports": { - } + }, + "exclude": [ + "notebooks/" + ] } diff --git a/notebooks/data_analytics_js.ipynb b/notebooks/data_analytics_js.ipynb index 96f8f27..6ff3fa8 100644 --- a/notebooks/data_analytics_js.ipynb +++ b/notebooks/data_analytics_js.ipynb @@ -493,6 +493,7 @@ ], "source": [ "import { display } from \"https://deno.land/x/display@v0.1.1/mod.ts\";\n", + "import { Plot } from \"https://l12.xyz/x/shortcuts/raw/plots.ts\";\n", "import pl from \"npm:nodejs-polars\";\n", "\n", "let data = await Deno.readTextFile(\"assets/CarPrice_Assignment.csv\");\n", @@ -674,86 +675,86 @@ "application/vnd.dataresource+json": { "bytes": null, "data": [ - { - "brand": "subaru" - }, - { - "brand": "renault" - }, - { - "brand": "buick" - }, - { - "brand": "vw" - }, - { - "brand": "chevrolet" - }, - { - "brand": "audi" - }, - { - "brand": "honda" - }, - { - "brand": "plymouth" - }, { "brand": "toyota" }, - { - "brand": "alfa-romero" - }, - { - "brand": "saab" - }, - { - "brand": "mazda" - }, { "brand": "mercury" }, + { + "brand": "mitsubishi" + }, + { + "brand": "honda" + }, + { + "brand": "mazda" + }, { "brand": "peugeot" }, - { - "brand": "nissan" - }, - { - "brand": "vokswagen" - }, - { - "brand": "volkswagen" - }, - { - "brand": "maxda" - }, - { - "brand": "bmw" - }, { "brand": "porcshce" }, { - "brand": "mitsubishi" - }, - { - "brand": "dodge" + "brand": "renault" }, { "brand": "isuzu" }, { - "brand": "porsche" + "brand": "dodge" + }, + { + "brand": "bmw" + }, + { + "brand": "vw" + }, + { + "brand": "maxda" + }, + { + "brand": "volkswagen" + }, + { + "brand": "alfa-romero" + }, + { + "brand": "chevrolet" }, { "brand": "toyouta" }, + { + "brand": "jaguar" + }, + { + "brand": "saab" + }, + { + "brand": "porsche" + }, + { + "brand": "audi" + }, + { + "brand": "vokswagen" + }, + { + "brand": "subaru" + }, + { + "brand": "nissan" + }, + { + "brand": "plymouth" + }, { "brand": "volvo" }, { - "brand": "jaguar" + "brand": "buick" } ], "description": null, @@ -786,7 +787,7 @@ "title": null }, "text/html": [ - "
brand
subaru
renault
buick
vw
chevrolet
audi
honda
plymouth
toyota
alfa-romero
saab
mazda
mercury
peugeot
nissan
vokswagen
volkswagen
maxda
bmw
porcshce
mitsubishi
dodge
isuzu
porsche
toyouta
volvo
jaguar
" + "
brand
toyota
mercury
mitsubishi
honda
mazda
peugeot
porcshce
renault
isuzu
dodge
bmw
vw
maxda
volkswagen
alfa-romero
chevrolet
toyouta
jaguar
saab
porsche
audi
vokswagen
subaru
nissan
plymouth
volvo
buick
" ] }, "execution_count": 4, @@ -823,70 +824,70 @@ "bytes": null, "data": [ { - "brand": "subaru" - }, - { - "brand": "peugeot" - }, - { - "brand": "plymouth" - }, - { - "brand": "mitsubishi" - }, - { - "brand": "porsche" - }, - { - "brand": "bmw" - }, - { - "brand": "chevrolet" - }, - { - "brand": "dodge" + "brand": "nissan" }, { "brand": "toyota" }, - { - "brand": "mazda" - }, - { - "brand": "mercury" - }, { "brand": "isuzu" }, { - "brand": "renault" + "brand": "plymouth" }, { - "brand": "buick" + "brand": "subaru" }, { "brand": "audi" }, { - "brand": "nissan" + "brand": "renault" }, { "brand": "honda" }, { - "brand": "jaguar" + "brand": "dodge" + }, + { + "brand": "bmw" + }, + { + "brand": "volvo" + }, + { + "brand": "peugeot" }, { "brand": "volkswagen" }, + { + "brand": "chevrolet" + }, + { + "brand": "mitsubishi" + }, + { + "brand": "buick" + }, { "brand": "alfa-romero" }, + { + "brand": "porsche" + }, + { + "brand": "mazda" + }, { "brand": "saab" }, { - "brand": "volvo" + "brand": "jaguar" + }, + { + "brand": "mercury" } ], "description": null, @@ -919,7 +920,7 @@ "title": null }, "text/html": [ - "
brand
subaru
peugeot
plymouth
mitsubishi
porsche
bmw
chevrolet
dodge
toyota
mazda
mercury
isuzu
renault
buick
audi
nissan
honda
jaguar
volkswagen
alfa-romero
saab
volvo
" + "
brand
nissan
toyota
isuzu
plymouth
subaru
audi
renault
honda
dodge
bmw
volvo
peugeot
volkswagen
chevrolet
mitsubishi
buick
alfa-romero
porsche
mazda
saab
jaguar
mercury
" ] }, "execution_count": 5, @@ -1818,11 +1819,11 @@ "brand_count": 3 }, { - "brand": "chevrolet", + "brand": "alfa-romero", "brand_count": 3 }, { - "brand": "alfa-romero", + "brand": "chevrolet", "brand_count": 3 }, { @@ -1838,11 +1839,11 @@ "brand_count": 6 }, { - "brand": "plymouth", + "brand": "audi", "brand_count": 7 }, { - "brand": "audi", + "brand": "plymouth", "brand_count": 7 }, { @@ -1865,22 +1866,22 @@ "brand": "volvo", "brand_count": 11 }, - { - "brand": "subaru", - "brand_count": 12 - }, { "brand": "volkswagen", "brand_count": 12 }, { - "brand": "mitsubishi", - "brand_count": 13 + "brand": "subaru", + "brand_count": 12 }, { "brand": "honda", "brand_count": 13 }, + { + "brand": "mitsubishi", + "brand_count": 13 + }, { "brand": "mazda", "brand_count": 17 @@ -1934,7 +1935,7 @@ "title": null }, "text/html": [ - "
brandbrand_count
mercury1
renault2
jaguar3
chevrolet3
alfa-romero3
isuzu4
porsche5
saab6
plymouth7
audi7
buick8
bmw8
dodge9
peugeot11
volvo11
subaru12
volkswagen12
mitsubishi13
honda13
mazda17
nissan18
toyota32
" + "
brandbrand_count
mercury1
renault2
jaguar3
alfa-romero3
chevrolet3
isuzu4
porsche5
saab6
audi7
plymouth7
buick8
bmw8
dodge9
peugeot11
volvo11
volkswagen12
subaru12
honda13
mitsubishi13
mazda17
nissan18
toyota32
" ] }, "execution_count": 8, @@ -2057,28 +2058,28 @@ "data": { "text/plain": [ "{\n", - " porsche: \u001b[33m31400.5\u001b[39m,\n", - " volkswagen: \u001b[33m10077.5\u001b[39m,\n", - " buick: \u001b[33m33647\u001b[39m,\n", - " plymouth: \u001b[33m7963.428571428572\u001b[39m,\n", - " peugeot: \u001b[33m15489.09090909091\u001b[39m,\n", " renault: \u001b[33m9595\u001b[39m,\n", - " volvo: \u001b[33m18063.18181818182\u001b[39m,\n", " jaguar: \u001b[33m34600\u001b[39m,\n", - " mitsubishi: \u001b[33m9239.76923076923\u001b[39m,\n", " saab: \u001b[33m15223.333333333334\u001b[39m,\n", - " honda: \u001b[33m8184.692307692308\u001b[39m,\n", - " audi: \u001b[33m17859.166714285715\u001b[39m,\n", - " mercury: \u001b[33m16503\u001b[39m,\n", - " chevrolet: \u001b[33m6007\u001b[39m,\n", - " dodge: \u001b[33m7875.444444444444\u001b[39m,\n", - " subaru: \u001b[33m8541.25\u001b[39m,\n", " nissan: \u001b[33m10415.666666666666\u001b[39m,\n", - " isuzu: \u001b[33m8916.5\u001b[39m,\n", - " \u001b[32m\"alfa-romero\"\u001b[39m: \u001b[33m15498.333333333334\u001b[39m,\n", - " mazda: \u001b[33m10652.882352941177\u001b[39m,\n", " toyota: \u001b[33m9885.8125\u001b[39m,\n", - " bmw: \u001b[33m26118.75\u001b[39m\n", + " mitsubishi: \u001b[33m9239.76923076923\u001b[39m,\n", + " porsche: \u001b[33m31400.5\u001b[39m,\n", + " plymouth: \u001b[33m7963.428571428572\u001b[39m,\n", + " dodge: \u001b[33m7875.444444444444\u001b[39m,\n", + " mazda: \u001b[33m10652.882352941177\u001b[39m,\n", + " honda: \u001b[33m8184.692307692308\u001b[39m,\n", + " peugeot: \u001b[33m15489.09090909091\u001b[39m,\n", + " audi: \u001b[33m17859.166714285715\u001b[39m,\n", + " volvo: \u001b[33m18063.18181818182\u001b[39m,\n", + " buick: \u001b[33m33647\u001b[39m,\n", + " chevrolet: \u001b[33m6007\u001b[39m,\n", + " isuzu: \u001b[33m8916.5\u001b[39m,\n", + " bmw: \u001b[33m26118.75\u001b[39m,\n", + " \u001b[32m\"alfa-romero\"\u001b[39m: \u001b[33m15498.333333333334\u001b[39m,\n", + " volkswagen: \u001b[33m10077.5\u001b[39m,\n", + " mercury: \u001b[33m16503\u001b[39m,\n", + " subaru: \u001b[33m8541.25\u001b[39m\n", "}" ] }, @@ -2115,16 +2116,16 @@ "brand_category": "Mid_Range" }, { - "brand_category": "Mid_Range" - }, - { - "brand_category": "Luxury" - }, - { - "brand_category": "Luxury" + "brand_category": "Budget" }, { "brand_category": "Mid_Range" + }, + { + "brand_category": "Mid_Range" + }, + { + "brand_category": "Budget" } ], "description": null, @@ -2157,7 +2158,7 @@ "title": null }, "text/html": [ - "
brand_category
Mid_Range
Mid_Range
Luxury
Luxury
Mid_Range
" + "
brand_category
Mid_Range
Budget
Mid_Range
Mid_Range
Budget
" ] }, "execution_count": 11, @@ -2245,22 +2246,22 @@ " { brand: \"mercury\", brand_count: 1 },\n", " { brand: \"renault\", brand_count: 2 },\n", " { brand: \"jaguar\", brand_count: 3 },\n", - " { brand: \"chevrolet\", brand_count: 3 },\n", " { brand: \"alfa-romero\", brand_count: 3 },\n", + " { brand: \"chevrolet\", brand_count: 3 },\n", " { brand: \"isuzu\", brand_count: 4 },\n", " { brand: \"porsche\", brand_count: 5 },\n", " { brand: \"saab\", brand_count: 6 },\n", - " { brand: \"plymouth\", brand_count: 7 },\n", " { brand: \"audi\", brand_count: 7 },\n", + " { brand: \"plymouth\", brand_count: 7 },\n", " { brand: \"buick\", brand_count: 8 },\n", " { brand: \"bmw\", brand_count: 8 },\n", " { brand: \"dodge\", brand_count: 9 },\n", " { brand: \"peugeot\", brand_count: 11 },\n", " { brand: \"volvo\", brand_count: 11 },\n", - " { brand: \"subaru\", brand_count: 12 },\n", " { brand: \"volkswagen\", brand_count: 12 },\n", - " { brand: \"mitsubishi\", brand_count: 13 },\n", + " { brand: \"subaru\", brand_count: 12 },\n", " { brand: \"honda\", brand_count: 13 },\n", + " { brand: \"mitsubishi\", brand_count: 13 },\n", " { brand: \"mazda\", brand_count: 17 },\n", " { brand: \"nissan\", brand_count: 18 },\n", " { brand: \"toyota\", brand_count: 32 }\n", @@ -2280,7 +2281,7 @@ ":where(.plot-d6a7b5 text),\n", ":where(.plot-d6a7b5 tspan) {\n", " white-space: pre;\n", - "}toyotanissanmazdahondamitsubishisubaruvolkswagenpeugeotvolvododgebmwbuickaudiplymouthsaabporscheisuzualfa-romerochevroletjaguarrenaultmercurybrand051015202530brand_count →" + "}toyotanissanmazdahondamitsubishisubaruvolkswagenpeugeotvolvododgebmwbuickaudiplymouthsaabporscheisuzualfa-romerochevroletjaguarrenaultmercurybrand051015202530brand_count →" ] }, "execution_count": 13, @@ -2289,7 +2290,8 @@ } ], "source": [ - "import { document, Plot } from \"https://l12.xyz/x/shortcuts/raw/plots.ts\";\n", + "\n", + "import { document } from \"https://l12.xyz/x/shortcuts/raw/plots.ts\";\n", "\n", "const brandCountRecords = brandCount.toRecords();\n", "console.log(brandCountRecords);\n", @@ -2805,35 +2807,6 @@ { "cell_type": "code", "execution_count": 20, - "id": "20b0317a-5807-4f28-9008-8540e5ee056a", - "metadata": { - "editable": true, - "slideshow": { - "slide_type": "" - }, - "tags": [] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "\u001b[33m0.8006648595531076\u001b[39m" - ] - }, - "execution_count": 20, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "import { ShapiroWilkW } from \"https://l12.xyz/x/shortcuts/raw/shapiro.ts\";\n", - "\n", - "ShapiroWilkW(df.price.sort());" - ] - }, - { - "cell_type": "code", - "execution_count": 21, "id": "8f8c6044-d3a1-4f8e-89ba-365fea3fbd8b", "metadata": { "editable": true, @@ -2859,7 +2832,7 @@ " " ] }, - "execution_count": 21, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } @@ -2870,33 +2843,6 @@ "await display(threeChart(log2df.toRecords(), \"price\"));" ] }, - { - "cell_type": "code", - "execution_count": 22, - "id": "9bdeba3c-2eac-44bc-8601-8241c5bfe502", - "metadata": { - "editable": true, - "slideshow": { - "slide_type": "" - }, - "tags": [] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "\u001b[33m0.948674582545282\u001b[39m" - ] - }, - "execution_count": 22, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "ShapiroWilkW(log2df.price.sort());" - ] - }, { "cell_type": "markdown", "id": "09a9d9c0-7fb6-4353-91f8-4899520b36d7", @@ -2913,7 +2859,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 21, "id": "79f05578-b839-4278-afb1-0123c1d32d17", "metadata": { "editable": true, @@ -3337,7 +3283,7 @@ "
brand_categorybrandfueltypeaspirationdoornumbercarbodydrivewheelenginelocationwheelbasecarlengthcarwidthcarheightcurbweightenginetypecylindernumberenginesizefuelsystemboreratiostrokecompressionratiohorsepowerpeakrpmcitympghighwaympgprice
Mid_Rangealfa-romerogasstdtwoconvertiblerwdfront88.6168.864.148.82548dohcfour130mpfi3.472.6891115000212713495
Mid_Rangealfa-romerogasstdtwoconvertiblerwdfront88.6168.864.148.82548dohcfour130mpfi3.472.6891115000212716500
Mid_Rangealfa-romerogasstdtwohatchbackrwdfront94.5171.265.552.42823ohcvsix152mpfi2.683.4791545000192616500
Mid_Rangeaudigasstdfoursedanfwdfront99.8176.666.254.32337ohcfour109mpfi3.193.4101025500243013950
Mid_Rangeaudigasstdfoursedan4wdfront99.4176.666.454.32824ohcfive136mpfi3.193.481155500182217450
" ] }, - "execution_count": 23, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -3361,7 +3307,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 22, "id": "e2df0c3f-dbc0-4820-b807-373ce3787645", "metadata": { "editable": true, @@ -3695,7 +3641,7 @@ "
brand_categoryfueltypeaspirationdoornumberdrivewheelwheelbasecarlengthcarwidthcarheightcurbweightenginetypecylindernumberenginesizefuelsystemboreratiohorsepowercitympghighwaympgprice
Mid_Rangegasstdtworwd88.6168.864.148.82548dohcfour130mpfi3.47111212713495
Mid_Rangegasstdtworwd88.6168.864.148.82548dohcfour130mpfi3.47111212716500
Mid_Rangegasstdtworwd94.5171.265.552.42823ohcvsix152mpfi2.68154192616500
Mid_Rangegasstdfourfwd99.8176.666.254.32337ohcfour109mpfi3.19102243013950
Mid_Rangegasstdfour4wd99.4176.666.454.32824ohcfive136mpfi3.19115182217450
" ] }, - "execution_count": 24, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } @@ -3729,7 +3675,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 23, "id": "9bc95dd8-0240-45c6-a0f9-21b1873ae04b", "metadata": { "editable": true, @@ -4453,7 +4399,7 @@ "
brand_category_Budgetbrand_category_Luxurybrand_category_Mid_Rangefueltype_dieselfueltype_gasaspiration_stdaspiration_turbodoornumber_fourdoornumber_twodrivewheel_4wddrivewheel_fwddrivewheel_rwdwheelbasecarlengthcarwidthcarheightcurbweightenginetype_dohcenginetype_dohcvenginetype_lenginetype_ohcenginetype_ohcfenginetype_ohcvenginetype_rotorcylindernumber_eightcylindernumber_fivecylindernumber_fourcylindernumber_sixcylindernumber_threecylindernumber_twelvecylindernumber_twoenginesizefuelsystem_1bblfuelsystem_2bblfuelsystem_4bblfuelsystem_idifuelsystem_mfifuelsystem_mpfifuelsystem_spdifuelsystem_spfiboreratiohorsepowercitympghighwaympgprice
00101100100188.6168.864.148.8254810000000010000130000001003.47111212713495
00101100100188.6168.864.148.8254810000000010000130000001003.47111212716500
00101100100194.5171.265.552.4282300000100001000152000001002.68154192616500
00101101001099.8176.666.254.3233700010000010000109000001003.19102243013950
00101101010099.4176.666.454.3282400010000100000136000001003.19115182217450
" ] }, - "execution_count": 25, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } @@ -4467,7 +4413,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 24, "id": "aff549ce-6736-43c7-8d40-b09b9ca7fa59", "metadata": { "editable": true, @@ -4509,7 +4455,7 @@ "name": "typescript", "nbconvert_exporter": "script", "pygments_lexer": "typescript", - "version": "5.5.2" + "version": "5.6.2" } }, "nbformat": 4, diff --git a/package.json b/package.json index 10d41a3..769735d 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,10 @@ "typescript": "^5.0.0" }, "dependencies": { - "nodejs-polars": "^0.15.0" + "@observablehq/plot": "^0.6.16", + "linkedom": "^0.18.5", + "nodejs-polars": "^0.15.0", + "vega": "^5.30.0", + "vega-lite": "^5.21.0" } } diff --git a/shapiro.ts b/shapiro.ts deleted file mode 100644 index 3d0b761..0000000 --- a/shapiro.ts +++ /dev/null @@ -1,306 +0,0 @@ -/* - * Ported from http://svn.r-project.org/R/trunk/src/nmath/qnorm.c - * - * Mathlib : A C Library of Special Functions - * Copyright (C) 1998 Ross Ihaka - * Copyright (C) 2000--2005 The R Core Team - * based on AS 111 (C) 1977 Royal Statistical Society - * and on AS 241 (C) 1988 Royal Statistical Society - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, a copy is available at - * http://www.r-project.org/Licenses/ - */ - -// The inverse of cdf. -function normalQuantile(p, mu, sigma) { - var p, q, r, val; - if (sigma < 0) { - return -1; - } - if (sigma == 0) { - return mu; - } - - q = p - 0.5; - - if (0.075 <= p && p <= 0.925) { - r = 0.180625 - q * q; - val = q * - (((((((r * 2509.0809287301226727 + 33430.575583588128105) * r + - 67265.770927008700853) * r + - 45921.953931549871457) * r + 13731.693765509461125) * - r + 1971.5909503065514427) * r + 133.14166789178437745) * r + - 3.387132872796366608) / - (((((((r * 5226.495278852854561 + 28729.085735721942674) * r + - 39307.89580009271061) * r + - 21213.794301586595867) * r + 5394.1960214247511077) * - r + 687.1870074920579083) * r + 42.313330701600911252) * r + - 1); - } else { - /* closer than 0.075 from {0,1} boundary */ - /* r = min(p, 1-p) < 0.075 */ - if (q > 0) { - r = 1 - p; - } else { - r = p; /* = R_DT_Iv(p) ^= p */ - } - - r = Math.sqrt( - -Math.log(r), - ); /* r = sqrt(-log(r)) <==> min(p, 1-p) = exp( - r^2 ) */ - - if (r <= 5.) { - /* <==> min(p,1-p) >= exp(-25) ~= 1.3888e-11 */ - r += -1.6; - val = - (((((((r * 7.7454501427834140764e-4 + 0.0227238449892691845833) * r + - .24178072517745061177) * r + - 1.27045825245236838258) * r + - 3.64784832476320460504) * r + 5.7694972214606914055) * r + - 4.6303378461565452959) * r + 1.42343711074968357734) / - (((((((r * 1.05075007164441684324e-9 + 5.475938084995344946e-4) * r + - .0151986665636164571966) * r + - 0.14810397642748007459) * r + - 0.68976733498510000455) * r + 1.6763848301838038494) * r + - 2.05319162663775882187) * r + 1); - } else { - /* very close to 0 or 1 */ - r += -5.; - val = - (((((((r * 2.01033439929228813265e-7 + 2.71155556874348757815e-5) * r + - 0.0012426609473880784386) * r + - 0.026532189526576123093) * r + - .29656057182850489123) * r + 1.7848265399172913358) * r + - 5.4637849111641143699) * r + - 6.6579046435011037772) / - (((((((r * 2.04426310338993978564e-15 + 1.4215117583164458887e-7) * r + - 1.8463183175100546818e-5) * r + - 7.868691311456132591e-4) * r + - .0148753612908506148525) * r + - .13692988092273580531) * r + .59983220655588793769) * r + 1.); - } - - if (q < 0.0) { - val = -val; - } - /* return (q >= 0.)? r : -r ;*/ - } - return mu + sigma * val; -} - -/* - * Ported from http://svn.r-project.org/R/trunk/src/library/stats/src/swilk.c - * - * R : A Computer Language for Statistical Data Analysis - * Copyright (C) 2000-12 The R Core Team. - * - * Based on Applied Statistics algorithms AS181, R94 - * (C) Royal Statistical Society 1982, 1995 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, a copy is available at - * http://www.r-project.org/Licenses/ - */ - -function sign(x) { - if (x == 0) { - return 0; - } - return x > 0 ? 1 : -1; -} - -export function ShapiroWilkW(x) { - function poly(cc, nord, x) { - /* Algorithm AS 181.2 Appl. Statist. (1982) Vol. 31, No. 2 - Calculates the algebraic polynomial of order nord-1 with array of coefficients cc. - Zero order coefficient is cc(1) = cc[0] */ - var p; - var ret_val; - - ret_val = cc[0]; - if (nord > 1) { - p = x * cc[nord - 1]; - for (j = nord - 2; j > 0; j--) { - p = (p + cc[j]) * x; - } - ret_val += p; - } - return ret_val; - } - x = x.sort(function (a, b) { - return a - b; - }); - var n = x.length; - if (n < 3) { - return undefined; - } - var nn2 = Math.floor(n / 2); - var a = new Array(Math.floor(nn2) + 1); /* 1-based */ - - /* ALGORITHM AS R94 APPL. STATIST. (1995) vol.44, no.4, 547-551. - - Calculates the Shapiro-Wilk W test and its significance level - */ - var small = 1e-19; - - /* polynomial coefficients */ - var g = [-2.273, 0.459]; - var c1 = [0, 0.221157, -0.147981, -2.07119, 4.434685, -2.706056]; - var c2 = [0, 0.042981, -0.293762, -1.752461, 5.682633, -3.582633]; - var c3 = [0.544, -0.39978, 0.025054, -6.714e-4]; - var c4 = [1.3822, -0.77857, 0.062767, -0.0020322]; - var c5 = [-1.5861, -0.31082, -0.083751, 0.0038915]; - var c6 = [-0.4803, -0.082676, 0.0030302]; - - /* Local variables */ - var i, j, i1; - - var ssassx, summ2, ssumm2, gamma, range; - var a1, a2, an, m, s, sa, xi, sx, xx, y, w1; - var fac, asa, an25, ssa, sax, rsn, ssx, xsx; - - var pw = 1; - an = n; - - if (n == 3) { - a[1] = 0.70710678; /* = sqrt(1/2) */ - } else { - an25 = an + 0.25; - summ2 = 0.0; - for (i = 1; i <= nn2; i++) { - a[i] = normalQuantile((i - 0.375) / an25, 0, 1); // p(X <= x), - var r__1 = a[i]; - summ2 += r__1 * r__1; - } - summ2 *= 2; - ssumm2 = Math.sqrt(summ2); - rsn = 1 / Math.sqrt(an); - a1 = poly(c1, 6, rsn) - a[1] / ssumm2; - - /* Normalize a[] */ - if (n > 5) { - i1 = 3; - a2 = -a[2] / ssumm2 + poly(c2, 6, rsn); - fac = Math.sqrt( - (summ2 - 2 * (a[1] * a[1]) - 2 * (a[2] * a[2])) / - (1 - 2 * (a1 * a1) - 2 * (a2 * a2)), - ); - a[2] = a2; - } else { - i1 = 2; - fac = Math.sqrt((summ2 - 2 * (a[1] * a[1])) / (1 - 2 * (a1 * a1))); - } - a[1] = a1; - for (i = i1; i <= nn2; i++) { - a[i] /= -fac; - } - } - - /* Check for zero range */ - - range = x[n - 1] - x[0]; - if (range < small) { - console.log("range is too small!"); - return undefined; - } - - /* Check for correct sort order on range - scaled X */ - - xx = x[0] / range; - sx = xx; - sa = -a[1]; - for (i = 1, j = n - 1; i < n; j--) { - xi = x[i] / range; - if (xx - xi > small) { - console.log("xx - xi is too big.", xx - xi); - return undefined; - } - sx += xi; - i++; - if (i != j) { - sa += sign(i - j) * a[Math.min(i, j)]; - } - xx = xi; - } - if (n > 5000) { - console.log("n is too big!"); - return undefined; - } - - /* Calculate W statistic as squared correlation - between data and coefficients */ - - sa /= n; - sx /= n; - ssa = ssx = sax = 0.; - for (i = 0, j = n - 1; i < n; i++, j--) { - if (i != j) { - asa = sign(i - j) * a[1 + Math.min(i, j)] - sa; - } else { - asa = -sa; - } - xsx = x[i] / range - sx; - ssa += asa * asa; - ssx += xsx * xsx; - sax += asa * xsx; - } - - /* W1 equals (1-W) calculated to avoid excessive rounding error - for W very near 1 (a potential problem in very large samples) */ - - ssassx = Math.sqrt(ssa * ssx); - w1 = (ssassx - sax) * (ssassx + sax) / (ssa * ssx); - var w = 1 - w1; - - /* Calculate significance level for W */ - - if (n == 3) { - /* exact P value : */ - var pi6 = 1.90985931710274; /* = 6/pi */ - var stqr = 1.04719755119660; /* = asin(sqrt(3/4)) */ - pw = pi6 * (Math.asin(Math.sqrt(w)) - stqr); - if (pw < 0.) { - pw = 0; - } - return w; - } - y = Math.log(w1); - xx = Math.log(an); - if (n <= 11) { - gamma = poly(g, 2, an); - if (y >= gamma) { - pw = 1e-99; /* an "obvious" value, was 'small' which was 1e-19f */ - return w; - } - y = -Math.log(gamma - y); - m = poly(c3, 4, an); - s = Math.exp(poly(c4, 4, an)); - } else { - /* n >= 12 */ - m = poly(c5, 4, xx); - s = Math.exp(poly(c6, 3, xx)); - } - - return w; -}