@explorable-viz/fluid 0.7.77 → 0.7.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fluid/fluid/lib/stats.fld +19 -0
- package/dist/fluid/shared/fluid.mjs +162 -268
- package/dist/fluid/shared/load-figure.js +167 -265
- package/package.json +1 -1
- package/dist/fluid/fluid/lib/dtw.fld +0 -47
- package/dist/fluid/fluid/lib/fnum.fld +0 -22
- package/dist/fluid/fluid/lib/some-constants.fld +0 -1
- package/dist/fluid/fluid/lib/text-viz.fld +0 -18
@@ -55,3 +55,22 @@ let likelihoodLE data target =
|
|
55
55
|
|
56
56
|
let likelihoodGE data target =
|
57
57
|
length (filter (fun x -> x >= target) data) / length data;
|
58
|
+
|
59
|
+
let likelihoodMap table prob = (fromSome (find (fun x -> x.prob <= prob) table)).msg;
|
60
|
+
|
61
|
+
let mkPercent num = (numToStr (num * 100)) ++ "%";
|
62
|
+
|
63
|
+
let leqP n m =
|
64
|
+
if n <= m
|
65
|
+
then "less"
|
66
|
+
else "more";
|
67
|
+
|
68
|
+
let gradedLeqP n m =
|
69
|
+
let ratio = n / m
|
70
|
+
in if ratio <= 1.0
|
71
|
+
then if ratio <=0.5
|
72
|
+
then "much less"
|
73
|
+
else "less"
|
74
|
+
else if ratio >= 2.0
|
75
|
+
then "much more"
|
76
|
+
else "more";
|