Skip to content

Reduce unit testing frequency #36

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: CI
on:
- push
- pull_request
push:
branches:
- master
pull_request:
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
Expand All @@ -11,18 +13,10 @@ jobs:
matrix:
version:
- '1' # Latest release
- 'nightly'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
exclude:
- os: macOS-latest
version: 'nightly'
- os: windows-latest
version: 'nightly'
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
Expand Down
2 changes: 1 addition & 1 deletion docs/src/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ julia> data[end,1:end] .= rand(100); # Randomize the last dimension of each poi
julia> hashes = map(x -> hashfn(x), eachcol(data));

julia> unique(hashes)
1-element Array{BitArray{1},1}:
1-element Vector{BitVector}:
[0]
```

Expand Down
6 changes: 3 additions & 3 deletions docs/src/function_hashing.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ julia> μ() = 2π*rand(); # μ samples a random point from [0,2π]
julia> hashfn = MonteCarloHash(cossim, μ, 3);

julia> hashfn(x -> 5x^3 - 2x^2 - 9x + 1)
3-element BitArray{1}:
3-element BitVector:
0
1
1
Expand Down Expand Up @@ -75,13 +75,13 @@ julia> μ() = 2π * rand(); # μ samples a random point from [0,2π]
julia> hashfn = MonteCarloHash(L2, μ, 3; volume=2π);

julia> hashfn(cos)
3-element Array{Int32,1}:
3-element Vector{Int32}:
-1
3
0

julia> hashfn(x -> x/(2π))
3-element Array{Int32,1}:
3-element Vector{Int32}:
-1
-2
-1
Expand Down
2 changes: 1 addition & 1 deletion docs/src/lshfunction_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ LSHFunctions.jl provides a few common utility functions that you can use across
julia> hashes = hashfn(rand(100));

julia> typeof(hashes)
BitArray{1}
BitVector (alias for BitArray{1})

julia> typeof(hashes[1]) == hashtype(hashfn)
true
Expand Down
2 changes: 1 addition & 1 deletion docs/src/similarities/cosine.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ julia> n_hashes(hashfn)
julia> hashes = hashfn(randn(4));

julia> typeof(hashes)
BitArray{1}
BitVector (alias for BitArray{1})

julia> length(hashes)
1
Expand Down
12 changes: 6 additions & 6 deletions docs/src/similarities/jaccard.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ UInt64
julia> A = Set([1, 2, 3]);

julia> hashfn(A)
5-element Array{UInt64,1}:
0x21be0e591a3b69ea
0x19c5f638a776ab3c
0x63c12fd5d2f073ab
0x5c6b11e538a36352
0x129ef927e80a1b39
5-element Vector{UInt64}:
0x68ab426365cf3fcf
0x13095267e4625e58
0x0c0f74c97d4d341e
0x1b294d39ad1e06a7
0x74a5bce47c6b635a
```

The probability of a collision for an individual hash between sets ``A`` and ``B`` is just equal to their Jaccard similarity, i.e.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/similarities/lp_distance.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ julia> x = rand(20);
julia> hashes = hashfn(x);

julia> typeof(hashes)
Array{Int32,1}
Vector{Int32} (alias for Array{Int32, 1})
```

`L1Hash` and `L2Hash` support a keyword parameter called `scale`. `scale` impacts the collision probability: if `scale` is large then hash collisions are more likely (even among distant points). If `scale` is small, then hash collisions are less likely (even among close points).
Expand Down
4 changes: 2 additions & 2 deletions src/function_hashing/monte_carlo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ julia> μ() = 2π * rand(); # μ samples a random point from [0,2π]
julia> hashfn = MonteCarloHash(L2, μ, 3; volume=2π);

julia> hashfn(cos)
3-element Array{Int32,1}:
3-element Vector{Int32}:
-1
3
0

julia> hashfn(x -> x/(2π))
3-element Array{Int32,1}:
3-element Vector{Int32}:
-1
-2
-1
Expand Down