blib/lib/App/quantile.pm untested

filter: Statementstmt 0.0% 0 / 2 totaltotal 0.0% 0 / 2 SCAR -
1 package App::quantile ;
2 our $VERSION = '0.014' ;
3 our $DATE = '2023-06-09T19:29+09:00' ;
4  
5 =encoding utf8
6  
7 =head1 NAME
8  
9 App::quantile -- calculates the quantiles.
10  
11 =head1 SYNOPSIS
12  
13 This module provides a Unix-like command `F<quantile>'.
14  
15 =head1 DESCRIPTION
16  
17 quantile -q N # This reads a number in each line from STDIN, then prints N-quantiles.
18  
19 `perldoc App::quantile' shows English help.
20 `perldoc quantile' and `quantile --help' shows Japanese help.
21  
22 分位点を求める。通常の(線形)補間値のみならず、上側の値と下側の値も出力する。
23 2次情報として何個の値を入力から読み取ったかも、標準エラー出力に出力。
24  
25 Options : N refers to a number.
26  
27 -= : 最初の行を読み飛ばす。
28 -q N : 分位分割の数Nを指定する。
29 -p 1..5など : 何番目の分位点を出力するかを指定する。小数も指定可能。, や .. が使える。
30 -a : 平均値も出力する(最も右の列に)。
31  
32 -h : 分位点の計算において、考えられる大きい値についても、出力する。
33 -I : 分位点を観測値に存在する値ではなくて、線形補間した値を用いる。
34 -l : 分位点の計算において、考えられる小さい値についても、出力する。
35 -0 : 通常のよく使われる分位点の値を出さない。(-h, -l, -i を使う時に便利。)
36 -s : 入力を数値としてではなく、文字列として処理する。日時を扱う場合などに使う。
37  
38 -L ; 層別に分位点を出力する。1列目を値と見なし、タブ区切り2列目以降を層のラベルと見なす。
39 -w ; 分位値を算出する際に、各値を平等に扱うのではなくて、その値自信で重みを付ける。(正の値を仮定する。)
40 -3 : -w で数値が2列とする。左側が昇順ソートされるが、重みは自己重みではなくて、右側の値となる。
41  
42 -i str ; 入力の区切り文字をstrとする。
43 -@ N : 一定秒数ごとに、標準エラー出力にレポートを出す。未指定なら、10秒。
44 -2 0 : Suppresses the secondary information.
45  
46 --help : Shows this help.
47 --help opt : Shows the option help.
48 --version : Shows the version information.
49
50 =head1 AUTHOR
51  
52 下野寿之 Toshiyuki SHIMONO <bin4tsv@gmail.com> The Institute of Statistical Mathematics, a visiting researcher.
53  
54 =head1 COPYRIGHT AND LICENSE
55  
56 Copyright (c) 2016-2023 Toshiyuki SHIMONO. All rights reserved.
57 This program is free software; you can redistribute it and/or
58 modify it under the same terms as Perl itself.
59  
60 =cut
61  
62 1 ;