RubyGems Navigation menu

ministat 1.2.5

ministat

DESCRIPTION:

This is a simple package that generates simple statistical info on numerical data sets of a single variable. It’s nothing too fancy, but maybe just enough to coat your numbers with a thin layer of science. Or, at least to get you thinking about what it may take to do so.

FEATURES/PROBLEMS:

  • Pure Ruby

  • It’s small and simple

  • It’s probably good enough

  • I haven’t profiled it against large data sets

  • Naive median implementation requires a sort, but it could be done in linear time. Patches welcome.

  • Missing tests for harmonic and geometric mean – the stats package I was generating test data with didn’t have them.

SYNOPSIS:

require 'ministat'

data = [1,2,3,4,5,6,7,7,6,5,4,4]
d = MiniStat::Data.new(data) 

d.median             # => 4.5
d.mean               # => 4.5
d.mode               # => 4.0
d.q1                 # => 3.5
d.outliers           # => []
d.std_dev            # => 1.80277563773199
# and so on...

puts MiniStat::Data.new(data).to_s
# this outputs most everything

REQUIREMENTS:

Hoe is your friend.

INSTALL:

sudo gem install ministat

LICENSE:

(The MIT License)

Copyright © 2007-2010 Dean Hudson

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Gemfile:
= 复制到剪贴板 已复制!

安装:
=

版本列表:

  1. 1.3.0 - October 16, 2011 (9.0 KB)
  2. 1.2.6 - November 23, 2010 (7.5 KB)
  3. 1.2.5 - November 13, 2010 (9.0 KB)
  4. 1.2.1 - June 18, 2010 (15.0 KB)
  5. 1.2.0 - June 18, 2010 (8.5 KB)
显示所有版本 (共 7 个)

业主:

作者:

  • Dean Hudson

SHA 256 校验和:

3011a08f330fb72a5239411c76849648efd61285fd1b654c36cab8e34bb12718

下载总量 26,781

这个版本 3,459

许可:

需要的 Ruby 版本:

链接: