Skip to content

Commit

Permalink
Remove the max_nnz argument again, which cna just be set in the mat…
Browse files Browse the repository at this point in the history
…ching pursuit method.
  • Loading branch information
RomeoV committed Aug 4, 2024
1 parent 1698c5c commit dd49139
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/KSVD.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ Dictionary vectors will be normalized such that ~all(norm.(eachcol(D), 2) .≈ 1
# Arguments
- `Y::AbstractMatrix{T}`: Input data matrix of size (num_features x num_samples)
- `n_atoms::Int`: Number of atoms (columns) in the dictionary
- `max_nnz=max(n_atoms÷10, 1)`: Maximum number of non-zero coefficients in each sparse representation
# Keyword Arguments
- `ksvd_update_method`: Method used for updating the dictionary (default: BatchedParallelKSVD)
Expand All @@ -84,7 +83,7 @@ A named tuple containing:
# Notes
To enable timing outputs, run `TimerOutputs.enable_debug_timings(KSVD)`.
"""
function ksvd(Y::AbstractMatrix{T}, n_atoms::Int, max_nnz=n_atoms÷10;
function ksvd(Y::AbstractMatrix{T}, n_atoms::Int;
ksvd_update_method = BatchedParallelKSVD{false, T}(; shuffle_indices=true, batch_size_per_thread=1),
sparse_coding_method = ParallelMatchingPursuit(; max_nnz, rtol=5e-2),
minibatch_size=nothing,
Expand Down

0 comments on commit dd49139

Please sign in to comment.