diff --git a/Project.toml b/Project.toml index ba6aab3..7eaa474 100644 --- a/Project.toml +++ b/Project.toml @@ -27,7 +27,8 @@ julia = "1.6" MLJBase = "a7f614a8-145f-11e9-1d2a-a57a1082229d" OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" +StatisticalMeasures = "a19d573c-0a75-4610-95b3-7071388c7541" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["MLJBase", "OffsetArrays", "StableRNGs", "Test"] +test = ["MLJBase", "OffsetArrays", "StableRNGs", "StatisticalMeasures", "Test"] diff --git a/src/kernels.jl b/src/kernels.jl index 19aa940..d415190 100644 --- a/src/kernels.jl +++ b/src/kernels.jl @@ -199,8 +199,8 @@ end """ Rank() -Assigns each neighbor a weight as a rank such that the closest neighbor get's a weight of -`1` and the Kth closest neighbor gets a weight of `K`. +Assigns each neighbor a weight as a rank from `K` to `1` such that the closest neighbor get's a weight of +`K` and the Kth closest neighbor gets a weight of `1`. For more information see the paper by Geler et.al [Comparison of different weighting schemes for the kNN classifier on time-series data](https://perun.pmf.uns.ac.rs/ diff --git a/test/runtests.jl b/test/runtests.jl index f1af38f..32203f3 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,6 +1,7 @@ using NearestNeighborModels using Distances using StableRNGs +using StatisticalMeasures using Test using MLJBase using OffsetArrays