Releases: PGS62/KendallTau.jl
v3.0.3
v3.0.2
Changed multi-threading code in light of https://julialang.org/blog/2023/07/PSA-dont-use-threadid/
v3.0.0
- Simpler code, with the result that
corkendall
works for vectors of any type for whichisless
is defined. Hence:
julia> corkendall(["a","b","c"],["z","y","x"])
-1.0
- Changed
corkendall
's behaviour whenskipmissing = :none
to follow that ofStatsBase.pairwise
- More tests.
v2.2.0
Improved performance for small correlation matrix
This release improves performance when Threads.nthreads()
is large but the correlation matrix being calculated has few rows and columns. The code no longer allocates scratch space that will never be used.
First threaded version to be considered for StatsBase
Release to allow for code review prior to making a PR to replace StatsBase's corkendall
with the version from this package.
Advantages:
- Speed. As described in the README file, this version of
corkendall
is faster than that in StatsBase by a factor close to the number of cores available. There is a speed up only when at least one ofx
andy
is a matrix - threading is not (easily) possible in the vector-vector case. - The function has a new keyword argument
skipmissing
, with allowed values:none
,:pairwise
and:listwise
Drawback:
- The function does not make use of StatsBase's
pairwise
function to implement the handling of missing values.
Version for 3rd PR to StatsBase
- Fixes for overflow errors, which were easy to hit on 32bit and possible to hit on 64bit
- Fixes for type instability.
- Improved tests.
Version for 1st PR to StatsBase
Fixed some type instabilities. This version is ready to be incorporated in StatsBase via a pull request.
See discussion at JuliaStats/StatsBase.jl#634
This PR was cancelled after tests revealed "overflow errors" on 32 bit
Faster again. Now uses less memory than StatsBase version.
-
Rewrote
insertionsort!
andmergesort!
by copy-paste-edit from the relevant methods ofsort!
in base/sort.jl. Upshot was further speed improvements and reduction in memory footprint. The function now allocates 30% to 40% less memory than the StatsBase version.In the case of
insertionsort!
it might be possible to usesort!
instead, but with a custom!isless(x,y)
and that would avoid the unpleasant code duplication. But in the case ofmergesort!
I don't think that is possible as the function!isless
would not "know" by how much to increase the swaps counter.Note that
StatsBase.corkendall
can also be criticised for for code duplication. It contains the mergesort algorithm in disguise as the functionswaps!
. -
Moved function
corkendallnaive
to the tests folder.
A bit faster and uses less memory than previous release.
Minor speed improvement, allocates less memory that v1.1, but still more than StatsBase.corkendall.