Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for different weight vector types #250

Merged
merged 50 commits into from
May 7, 2017

Commits on May 6, 2017

  1. Initial work on adding weight vector types with bias correction.

    NOTE: This broke a lot of things, so for now I'm keeping the existing tests without correction
    
    * WeightVec -> AbstractWeights
    * Weights (aka default reliability weights)
    * FrequencyWeights (limited to vectors of integers)
    * All weights take a corrected argument which defaults to true.
    * Added an exponential function which creates a set of exponential `Weights`.
    * Updated existing test cases to work with the appropriate types and added false to `weights` calls to avoid breaking existing test cases.
    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    a323fc9 View commit details
    Browse the repository at this point in the history
  2. Added corrected option to many stats methods.

    * Reverts many test changes from the last commit
    * Changed a bunch of test cases to use `corrected=false` for now
    * This included a lot of little changes to method definition and some resulting formatting changes where necessary
    * Added a few test cases for the corrected variances
    * Added bias correction for ProbabililtyWeights.
    * Deprecated `WeightVec`
    * Added a macro for easier creation of weight types.
    * Renamed weight creation function to `fweights`, `pweights`, etc.
    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    457f919 View commit details
    Browse the repository at this point in the history
  3. Fixed style issues.

    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    7cd959d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d0653db View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e886066 View commit details
    Browse the repository at this point in the history
  6. Updated the "default" bias correction code to iteratively compute the…

    … sum squared norm vs using vectorized operations.
    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    6710bcb View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e662b9d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e7f2ce9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    15d8100 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    520c061 View commit details
    Browse the repository at this point in the history
  11. Changed function name bias -> cfactor.

    * Started dispatching on corrected value rather than repeating the same corrected check for each weights type.
    * Added extra documentation for the different weights type, including documenting the alternative names for each type.
    * `cfactor(::AbstractWeights, true` now throws an argument error to avoid return an incorrect result for weight types that don't provide bias correction.
    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    a23b8cb View commit details
    Browse the repository at this point in the history
  12. Removed corrected flag from skewness and kurtosis and set default…

    … behaviour to corrected=false.
    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    25f69f3 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    096548c View commit details
    Browse the repository at this point in the history
  14. Removed corrected option from moments, but kept it for _moment2

    … for `varm` to call internally.
    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    616408d View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    b73a00a View commit details
    Browse the repository at this point in the history
  16. Fixed comments in export.

    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    a9485db View commit details
    Browse the repository at this point in the history
  17. Fixed more style issues.

    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    7f179ef View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    c9437ab View commit details
    Browse the repository at this point in the history
  19. Updated weights docstrings.

    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    7072eae View commit details
    Browse the repository at this point in the history
  20. Reworked var and std definitions and doc strings.

    * `corrected` is now an optional argument rather than a keyword so we can produce a deprecation warning about `corrected=false` becoming `corrected=true`.
      NOTE: this is contrary to the `std` and `var` methods in base, but base julia isn't even consistent about whether `corrected` is a keyword or not betwen `var`, `std` and `cov`.
    * The `var` and `std` methods now have doc strings explaining how bias correction works with weight vectors.
    * `mean_and_x` methods default to what they were before.
    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    46a1aa9 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    e831d15 View commit details
    Browse the repository at this point in the history
  22. Updated mean_and_x docstrings to mention corrected and point to the…

    … `var` or `std` documentation.
    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    4ade783 View commit details
    Browse the repository at this point in the history
  23. Added documentation about corrected argument in cov and `mean_and…

    …_cov` docstring. Also, added deprecation for cov `corrected=false` behaviour.
    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    7bdc112 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    f6f3b38 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    ad49920 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    def70e2 View commit details
    Browse the repository at this point in the history
  27. Updated test/moments.jl to use @testset so that we can test against…

    … multiple weight types corrected vs uncorrected calculations.
    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    06ec7f9 View commit details
    Browse the repository at this point in the history
  28. Updated test/weights.jl to use @testset so that we can test against…

    … multiple weight types and added tests for `eweights`.
    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    1765f67 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    4b42570 View commit details
    Browse the repository at this point in the history
  30. Switched positional corrected back to a keyword with `Union{Bool, Voi…

    …d}` deprecation approach.
    
    * Reverted some of the code reorganization changes in moments.jl and cov.jl to make the PR review easier
    * Added a DepBool alias for `Union{Bool, Void}`
    * Added a `depcheck` method for checking handling deprecation of unset `corrected` keyword.
    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    dd9e94e View commit details
    Browse the repository at this point in the history
  31. Added generic Weights type and deprecated WeightVec to it.

    Also, did a bunch of docs cleanup from the previous commit.
    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    a627e01 View commit details
    Browse the repository at this point in the history
  32. Removed eweights and fixed up test cases.

    * Removed eweights from this PR.
    * Fixed up weights and moments tests cases to loop over weight types more often.
    * Fixed Probability weights n = length(w) -> n = count(!iszero, w)
    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    34c88f2 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    1f01bc0 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    bdec9e1 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    c0f6488 View commit details
    Browse the repository at this point in the history
  36. Updated docs to refer to AbstractWeighs vs WeightVec and included…

    … a brief description of different weight types.
    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    a8624cd View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    745c419 View commit details
    Browse the repository at this point in the history
  38. More doc fixes.

    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    8d85af7 View commit details
    Browse the repository at this point in the history
  39. Removed fweights from tests in favour of weights (to reduces PR s…

    …ize) or `f` where appropriate.
    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    05a3cd7 View commit details
    Browse the repository at this point in the history
  40. Moved description of different weight types in an Implementations sec…

    …tions and decided to only reference the `var`, `std` and `cov` docstrings.
    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    2370595 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    3f84e71 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    8bcf448 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    dedb155 View commit details
    Browse the repository at this point in the history
  44. Not sure how much this helped, but tried to minimize the amount of `@…

    …testset` changes (`cov` was kind of a lost cause).
    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    281654d View commit details
    Browse the repository at this point in the history
  45. Added comment about unsupported bias correction for the Weights typ…

    …e in `var`, `std` and `cov` docstrings.
    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    5bdf58b View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    b991667 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    926678e View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    85ace2a View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    a0a2ad6 View commit details
    Browse the repository at this point in the history
  50. More rst docstring updates.

    rofinn committed May 6, 2017
    Configuration menu
    Copy the full SHA
    6087b7f View commit details
    Browse the repository at this point in the history