Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Aug 26, 2015
  1. @akrawitz @trevnorris

    Fix cdf()sreturn values

    akrawitz authored trevnorris committed
    Fix cdf()s to return 0 below support and 1 above support
    
    Fixes for multiple distributions (centralF, chisquare, gamma, invgamma,
    kumaraswamy, lognormal, pareto, triangular) so that cdf()s return proper
    values outside of support.
    
    Also added testing for these cdf()s. If test already existed, just added
    ones outside support, otherwise added multiple tests inside and outside
    support.
    
    PR-URL: #157
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Commits on Aug 25, 2015
  1. @akrawitz @trevnorris

    Add new test cases for chisquare.pdf()

    akrawitz authored trevnorris committed
    Add test cases for chisquare.pdf() when x=0 and df <= 2. Used R's
    dchisq() for reference.
    
    PR-URL: #154
    Reivewed-by: Trevor Norris <trev.norris@gmail.com>
  2. @akrawitz @trevnorris

    Adding new tests for centralF.pdf

    akrawitz authored trevnorris committed
    Adding tests for edge cases where x = 0 and df1 <= 2.
    
    PR-URL: #153
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
  3. @akrawitz @trevnorris

    Fix kumaraswamy.pdf and add tests

    akrawitz authored trevnorris committed
    Add special cases for the two instances where the 'log' form of the PDF
    fails (when x = 0 and alpha = 1, and when x = 1, and beta = 1).
    Also added extensive tests for the kumaraswamy.pdf() based on dkumar()
    in R package VGAM. Note that there are a few cases where the R function
    incorrectly returns NaN. You can confirm the correct values in these
    cases by doing the math using the function for the PDF here:
    https://en.wikipedia.org/wiki/Kumaraswamy_distribution
    
    PR-URL: #155
    Reviewed-By: James Gibson <james.cameron.gibson@gmail.com>
  4. @akrawitz @trevnorris

    Add quantile function for Kumaraswamy distribution

    akrawitz authored trevnorris committed
    The Kumaraswamy distribution didn't have a qunatile function defined
    yet, so I have added one. The math is based on the equation provided in
    the documentation for the R function quakur here:
    http://www.cran.r-project.org/web/packages/lmomco/lmomco.pdf
    
    Add tests for kumaraswamy.inv()
    
    Add tests using R's qkumar() in package VGAM as a reference.
    
    PR-URL: #152
    Reviewed-By: James Gibson <james.cameron.gibson@gmail.com>
  5. @akrawitz @trevnorris

    Add median function for beta distribution

    akrawitz authored trevnorris committed
    The median function was not yet implemented for the beta distribution.
    This adds one using a straightforward implementation based on the
    already existing quantile function.
    
    Adding testing for beta.median and fixing testing for beta.mode
    
    Adding tests for beta.median, comparing it to qbeta() in R. Also fixing
    the tests for beta.mode which had a significant digits problem and a
    typo.
    
    PR-URL: #151
    Reviewed-By: James Gibson <james.cameron.gibson@gmail.com>
  6. @akrawitz @trevnorris

    Add quantile function for Pareto distribution

    akrawitz authored trevnorris committed
    The Pareto distribution did not have a quantile function (inverse
    cumulative distribution function) defined. The math for this function is
    based on the formula qf defined here:
    http://www.distributome.org/js/DistributomeDBSearch.xml.php?s=pareto
    
    Adding testing for pareto.inv()
    
    Testing pareto.inv() against values from qpareto() in R package VGAM.
    
    PR-URL: #150
    Reviewed-By: James Gibson <james.cameron.gibson@gmail.com>
  7. @skawian @trevnorris

    calculating percentile

    skawian authored trevnorris committed
    PR-URL: #160
    Reviewed-By: James Gibson <james.cameron.gibson@gmail.com>
  8. @smarden1 @trevnorris

    Add difference of proportions test and docs

    smarden1 authored trevnorris committed
    PR-URL: #158
    Reviewed-By: James Gibson <james.cameron.gibson@gmail.com>
Commits on Jul 20, 2015
  1. @akrawitz @trevnorris

    Update tests for triangular.pdf

    akrawitz authored trevnorris committed
    Updating and adding tests for triangular.pdf(). One of the previous
    tests was:
    assert.epsilon(tol, jStat.triangular.pdf(1.0, 1.0, 2.0, 1.0), 1.0);
    This test was failing, however the test is incorrect. A comment in the
    test code claimed that this test was based on R's dtriangle(x, a, b, c)
    from package 'triangle', however this is not consistent with the current
    return value for the R code:
    > dtriangle(1, 1, 2, 1)
    [1] NaN
    Warning message:
    In dTest(c(x, a, b, c)) :
    values required to be  a <= c <= b (at least one strict inequality)
    
    To further confuse matters, dtriangle() clearly has a bug in it, given
    that NaN is not the correct value for this case, and the provided
    warning is not even consistent with the passed parameters!
    
    So I am now using R's dtriang() from package mc2d as my reference, as it
    appears to be a better implementation of the triangular distribution.
    
    I have added the reference R code into the comment in the test file,
    since if we are going to refer to R functions for tests, we might as
    well make it easy for someone to confirm.
    
    Furthermore, I have added more tests, in an attempt to get basic
    coverage of the various segments of the triangular distribution for each
    of the basic forms it can take.
    
    PR-URL: #148
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Commits on Jun 22, 2015
  1. @jamescgibson @trevnorris

    Update documentation and add test for mode(true)

    jamescgibson authored trevnorris committed
    The documentation previously specified that jStat(<two dimensional
    array>).mode(true) returned 'the mode of the array', i.e. the most
    common row. However, inspection of the .mode() function shows that
    .mode(true) instead treats the two-dimensional array as one dimensional.
    
    I believe this is a reasonable method option; as far as I can tell there
    is no commonly accepted definition for 'the mode of an array'. If there
    is strong demand for 'finding the most common data point in my two
    dimensional data', it would be better to define it explicitly.
    
    Add a test to verify this behavior and update the documentation to
    reflect this.
    
    Fixes: #50
    PR-URL: #144
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Commits on Jun 16, 2015
  1. @fbukevin @trevnorris

    Add row-based vector summation.

    fbukevin authored trevnorris committed
    Also remove redundant variable 'tmp' in sum function.
    
    PR-URL: #140
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
  2. @yujiosaka @trevnorris

    support all parameters in ztest as documented

    yujiosaka authored trevnorris committed
    PR-URL: #141
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Commits on May 5, 2015
  1. @jamescgibson @trevnorris

    Tests for the student t distribution

    jamescgibson authored trevnorris committed
    PR-URL: #138
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Commits on Apr 29, 2015
  1. @trevnorris

    Merge branch '1.1'

    trevnorris authored
    Conflicts:
    	package.json
  2. @kbroman @trevnorris

    Add non-central-t distribution and tests

    kbroman authored trevnorris committed
    The code does have convergence issues when the non-centrality parameter
    is large. (It can give inaccurate results.)
    
    Fixes: #131
    PR-URL: #135
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
  3. @jamescgibson @trevnorris

    Fix incorrect formula for beta distribution

    jamescgibson authored trevnorris committed
    The formula for the mode of the beta distribution was incorrect.
    Corrected using Wolfram Alpha as test reference.
    
    Fixes: #133
    PR-URL: #134
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Commits on Jan 22, 2015
  1. @jamescgibson @trevnorris

    Triangular Distribution returning NaN

    jamescgibson authored trevnorris committed
    The triangular pdf suffered from a bug in which, when c === a (c === b),
    the function would return NaN. Special cases added to avoid dividing by
    c - a (c - b).
    
    PR-URL: #124
    Fixes: #101
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Commits on Jan 5, 2015
  1. @jamescgibson @trevnorris

    Begin Clarifying Gamma Function Names

    jamescgibson authored trevnorris committed
    The commit that fixed #117 changed gammap from implementing the lower
    regularized incomplete gamma function to the lower incompelte gamma
    function. Add the lowRegGamma() function to keep the old functionality,
    such that all existing tests pass.
    
    Improve documetnation to reflect these changes.
    
    PR-URL: #122
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Commits on Dec 30, 2014
  1. @jamescgibson @trevnorris

    fix the centralF Distribution x = 0

    jamescgibson authored trevnorris committed
    Add tests for the central f distribution's pdf where x = 0.0. There are
    two special cases that are not handled by the general form of the
    central F distribution's pdf (df1 = 1 and df2 = 1; df1 = 2 and df2 = 1);
    handle these with specific checks.
    
    Fixes: #97
    PR-URL: #119
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
  2. @jamescgibson @trevnorris

    Remove unneeded .isNumber calls

    jamescgibson authored trevnorris committed
    Vows .epislon now checks if the argument is a number, no longer
    necessary.
    
    PR-URL: #119
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
  3. @jamescgibson @trevnorris

    Add tests for the ChiSquare Distribution

    jamescgibson authored trevnorris committed
    Confirms that f16411c successfully fixes
    #98
    
    Fixes: #98
    PR-URL: #120
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Commits on Dec 19, 2014
  1. @trevnorris

    Fix gammap()

    trevnorris authored
    Also add minimal tests to check both logic branches in gammap().
    
    Fixes: #117
    Signed-off-by: Trevor Norris <trev.norris@gmail.com>
  2. @jamescgibson @trevnorris

    Adding tests for the normal pdf

    jamescgibson authored trevnorris committed
    PR-URL: #118
    Fixes: #113
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Commits on Dec 17, 2014
  1. @cmpolis @trevnorris

    Add additional vector functions

    cmpolis authored trevnorris committed
    Add histogram() to get histogram/bin count data, kurtosis() and
    skewness().
    
    PR-URL: #111
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
  2. @jamescgibson @trevnorris

    Refactor distribution tests to multiple files

    jamescgibson authored trevnorris committed
    PR-URL: #115
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Commits on Dec 3, 2014
  1. @tlsim @trevnorris

    Add cumreduce function

    tlsim authored trevnorris committed
    Add cumulative array/matrix sum and product in terms of cumulative
    reduce.
    
    PR-URL: #112
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
  2. @tlsim @trevnorris

    Add exp and log linear algebra functions.

    tlsim authored trevnorris committed
    PR-URL: #112
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Commits on Nov 8, 2014
  1. @jamescgibson @trevnorris

    Add uniform.inv API and tests

    jamescgibson authored trevnorris committed
    Also added tests for previously untested uniform.pdf and uniform.cdf
    functions.
    
    PR-URL: #110
    Fixes: #109
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Commits on Oct 31, 2014
  1. @jamescgibson @trevnorris

    Prevent overflow error in centralF pdf

    jamescgibson authored trevnorris committed
    Use the algorithm found in the R source to calculate the centralF pdf,
    which avoids large exponentiation and hence doesn't suffer from NaN
    overflow errors.
    
    Fixes: #100
    PR-URL: #107
    Signed-off-by: Trevor Norris <trev.norris@gmail.com>
  2. @jamescgibson @trevnorris

    Removing duplicate distribution tests

    jamescgibson authored trevnorris committed
    Test group for binomial pdf was exactly duplicated
    
    PR-URL: #107
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Commits on Sep 30, 2014
  1. @jamescgibson @trevnorris

    Fix bug in gauss_elimination and add tests

    jamescgibson authored trevnorris committed
    Add tests for gaussian elimination function. Tests uncovered a bug; for
    matricies of dimension greater than 3, the results of gauss_elimination
    would always fail because of a problem in the back-substitution portion
    of the algorithm. Bug has been fixed.
    
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
  2. @jamescgibson @trevnorris

    Add more linear algebra tests

    jamescgibson authored trevnorris committed
    Fix a small bug in the .inv() method. While .inv() returned the correct
    inverse, it did so with an additional column at index '-1'. Although the
    other functions in the library ignored the '-1' column, the additional
    column prevented equality comparisons. This has been fixed.
    
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Commits on Sep 5, 2014
  1. @jamescgibson @trevnorris

    Add tests for various linear algebra functions

    jamescgibson authored trevnorris committed
    Additionally, fixed a small bug that prevented .dot() and .angle() from
    being called on a jStat object, as opposed to as a static function.
    
    There are still untested functions in the linear algebra library, and it
    does not make sense that all of the linear algebra functions can be
    called on a jStat() object but only accept plain matricies as arguments.
    This future change will be made easier with fuller test coverage.
    
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Commits on Sep 4, 2014
  1. @trevnorris
Something went wrong with that request. Please try again.