Created
August 6, 2015 20:53
-
-
Save rleonid/a86e0c00469c8ccb293c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # let data_skew ftf = | |
| Array.init 10000 (fun i -> if i mod ftf = 0 then n2 () else n1()) | |
| |> Descriptive.unbiased_summary | |
| |> fun s -> s.Descriptive.skew | |
| |> snd ;; | |
| val data_skew : int -> Oml.Descriptive.skew_classification = <fun> | |
| # let count_big_skew = | |
| Array.fold_left (fun c s -> | |
| if s = `Positive || s = `Negative then c + 1 else c) 0 ;; | |
| val count_big_skew : _[> `Negative | `Positive ] array -> int = <fun> | |
| # Array.init 100 (fun _ -> data_skew 10) |> count_big_skew ;; | |
| - : int = 86 | |
| # Array.init 100 (fun _ -> data_skew 2) |> count_big_skew ;; | |
| - : int = 33 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment