Skip to content

Releases: lbarasti/statistics

v1.0.1

13 Apr 00:18
Compare
Choose a tag to compare

Add support for Crystal 1.0.0.

v1.0.0

13 Apr 19:55
Compare
Choose a tag to compare
  • Introduce DiscreteDistribution and ContinuousDistribution
  • Add pdf and pmf to continuous and discrete distributions, respectively
  • Add Bernoulli distribution
  • Update Statistics.bin_count to be more flexible - see docs

v0.3.0

10 Apr 19:56
Compare
Choose a tag to compare
  • Upgrade to Crystal 0.34.0

  • Add support for data binning with Statistics.bin_count.

    sample = [0.5, 0.8, 0.85, 1.2, 2, 2.2, 2.8, 3.3, 4]
    
    Statistics.bin_count(sample, bins: 4, min: 0)
    # [{0.0, 3}, {1.0, 1}, {2.0, 3}, {3.0, 2}]

    You can check out the docs for more details.

v0.2.0

04 Apr 07:17
Compare
Choose a tag to compare

Parametrize Distribution in the return type of Distribution#rand.

This improves type resolution when mixing different distributions, for example in the expression

x = rand < 0.5 ? Normal.new(0.1, 0.02) : Uniform.new(0.2, 0.5)

x is resolved to the type Distribution(Float64).

v0.1.1

02 Apr 23:44
Compare
Choose a tag to compare

Make all the probability distributions inherit from a single abstract class Statistics::Distributions::Distribution.

This simplifies the signature of methods accepting different distributions.

Bonus: improve Distributions module documentation.

v0.1.0

30 Mar 23:43
Compare
Choose a tag to compare

The first release of statistics includes the following statistical functions

  • mean, median, middle, mode
  • std, var
  • skew, kurtosis
  • quantile
  • frequency
  • moment

It also includes the convenience function describe, to provide an overview of the main statistical measures for a given dataset.

Finally, in the Statistics::Distributions module, you will find classes to sample random numbers from the following statistical distributions

  • Constant
  • Exponential
  • Normal
  • Poisson
  • Uniform