Skip to content

Commit

Permalink
Update svd docstrings.
Browse files Browse the repository at this point in the history
  • Loading branch information
rofinn committed Feb 21, 2020
1 parent eec8630 commit d7c0220
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/imputors/svd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
Imputes the missing values in a matrix using an expectation maximization (EM) algorithm
over low-rank SVD approximations.
# Keyword Arguments
* `init::Imputor`: initialization method for missing values (default: Fill())
* `rank::Union{Int, Nothing}`: rank of the SVD approximation (default: nothing meaning start and 0 and increase)
* `tol::Float64`: convergence tolerance (default: 1e-10)
* `maxiter::Int`: Maximum number of iterations if convergence is not achieved (default: 100)
* `limits::Unoin{Tuple{Float64, Float64}, Nothing}`: Bound the possible approximation values (default: nothing)
* `verbose::Bool`: Whether to display convergence progress (default: true)
* `context::Context`: Missing data context settings (default: Context())
# References
* Troyanskaya, Olga, et al. "Missing value estimation methods for DNA microarrays." Bioinformatics 17.6 (2001): 520-525.
"""
struct SVD <: Imputor
init::Fill
Expand All @@ -20,11 +32,6 @@ function SVD(;
SVD(init, rank, tol, maxiter, limits, verbose, context)
end

"""
impute!(imp::SVD, ctx::Context, data::AbstractMatrix)
"""
function impute!(data::AbstractMatrix{<:Union{T, Missing}}, imp::SVD) where T<:Real
n, p = size(data)
k = imp.rank === nothing ? 0 : min(imp.rank, p-1)
Expand Down

0 comments on commit d7c0220

Please sign in to comment.