@@ -9,14 +9,14 @@ $PCA_DESCR
99
1010# Keyword Parameters
1111
12- - `maxoutdim::Int=0`: maximum number of output dimensions, uses the smallest dimension of
12+ - `maxoutdim::Int=0`: maximum number of output dimensions, uses the smallest dimension of
1313 training feature matrix if 0 (default).
14- - `method::Symbol=:auto`: method to use to solve the problem, one of `:auto`,`:cov`
14+ - `method::Symbol=:auto`: method to use to solve the problem, one of `:auto`,`:cov`
1515 or `:svd`
1616- `pratio::Float64=0.99`: ratio of variance preserved
17- - `mean::Union{Nothing, Real, Vector{Float64}}=nothing`: if set to nothing(default)
18- centering will be computed and applied, if set to `0` no
19- centering(assumed pre-centered), if a vector is passed, the centering is done with
17+ - `mean::Union{Nothing, Real, Vector{Float64}}=nothing`: if set to nothing(default)
18+ centering will be computed and applied, if set to `0` no
19+ centering(assumed pre-centered), if a vector is passed, the centering is done with
2020 that vector.
2121"""
2222@mlj_model mutable struct PCA <: MMI.Unsupervised
@@ -74,14 +74,14 @@ $KPCA_DESCR
7474
7575# Keyword Parameters
7676
77- - `maxoutdim::Int = 0`: maximum number of output dimensions, uses the smallest
77+ - `maxoutdim::Int = 0`: maximum number of output dimensions, uses the smallest
7878 dimension of training feature matrix if 0 (default).
79- - `kernel::Function=(x,y)->x'y`: kernel function of 2 vector arguments x and y, returns a
79+ - `kernel::Function=(x,y)->x'y`: kernel function of 2 vector arguments x and y, returns a
8080 scalar value
81- - `solver::Symbol=:auto`: solver to use for the eigenvalues, one of `:eig`(default),
81+ - `solver::Symbol=:auto`: solver to use for the eigenvalues, one of `:eig`(default),
8282 `:eigs`
83- - `inverse::Bool=false `: perform calculation for inverse transform
84- - `beta::Real=1.0`: strength of the ridge regression that learns the inverse transform
83+ - `inverse::Bool=true `: perform calculations needed for inverse transform
84+ - `beta::Real=1.0`: strength of the ridge regression that learns the inverse transform
8585 when inverse is true
8686- `tol::Real=0.0`: Convergence tolerance for eigs solver
8787- `maxiter::Int=300`: maximum number of iterations for eigs solver
@@ -90,7 +90,7 @@ $KPCA_DESCR
9090 maxoutdim:: Int = 0 :: (_ ≥ 0)
9191 kernel:: Union{Nothing, Function} = default_kernel
9292 solver:: Symbol = :eig :: (_ in (:eig, :eigs) )
93- inverse:: Bool = false
93+ inverse:: Bool = true
9494 beta:: Real = 1.0 :: (_ ≥ 0.0)
9595 tol:: Real = 1e-6 :: (_ ≥ 0.0)
9696 maxiter:: Int = 300 :: (_ ≥ 1)
@@ -102,7 +102,7 @@ function MMI.fit(model::KernelPCA, verbosity::Int, X)
102102 # default max out dim if not given
103103 maxoutdim = model. maxoutdim == 0 ? mindim : model. maxoutdim
104104 fitresult = MS. fit (
105- MS. KernelPCA,
105+ MS. KernelPCA,
106106 permutedims (Xarray);
107107 kernel= model. kernel,
108108 maxoutdim= maxoutdim,
@@ -143,17 +143,17 @@ $ICA_DESCR
143143
144144- `k::Int=0`: number of independent components to recover, set automatically if `0`
145145- `alg::Symbol=:fastica`: algorithm to use (only `:fastica` is supported at the moment)
146- - `fun::Symbol=:tanh`: approximate neg-entropy functor, via the function
146+ - `fun::Symbol=:tanh`: approximate neg-entropy functor, via the function
147147 `MultivariateStats.icagfun`, one of `:tanh` and `:gaus`
148148- `do_whiten::Bool=true`: whether to perform pre-whitening
149149- `maxiter::Int=100`: maximum number of iterations
150150- `tol::Real=1e-6`: convergence tolerance for change in matrix W
151- - `mean::Union{Nothing, Real, Vector{Float64}}=nothing`: mean to use, if nothing (default)
152- centering is computed andapplied, if zero, no centering, a vector of means can
151+ - `mean::Union{Nothing, Real, Vector{Float64}}=nothing`: mean to use, if nothing (default)
152+ centering is computed andapplied, if zero, no centering, a vector of means can
153153 be passed
154- - `winit::Union{Nothing,Matrix{<:Real}}=nothing`: initial guess for matrix `W` either
155- an empty matrix (random initilization of `W`), a matrix of size `k × k` (if `do_whiten`
156- is true), a matrix of size `m × k` otherwise. If unspecified i.e `nothing` an empty
154+ - `winit::Union{Nothing,Matrix{<:Real}}=nothing`: initial guess for matrix `W` either
155+ an empty matrix (random initilization of `W`), a matrix of size `k × k` (if `do_whiten`
156+ is true), a matrix of size `m × k` otherwise. If unspecified i.e `nothing` an empty
157157 `Matrix{<:Real}` is used.
158158"""
159159@mlj_model mutable struct ICA <: MMI.Unsupervised
@@ -216,14 +216,14 @@ $PPCA_DESCR
216216
217217# Keyword Parameters
218218
219- - `maxoutdim::Int=0`: maximum number of output dimensions, uses max(no_of_features - 1, 1)
219+ - `maxoutdim::Int=0`: maximum number of output dimensions, uses max(no_of_features - 1, 1)
220220 if 0 (default).
221221- `method::Symbol=:ml`: method to use to solve the problem, one of `:ml`, `:em`, `:bayes`.
222222- `maxiter::Int=1000`: maximum number of iterations.
223223- `tol::Real=1e-6`: convergence tolerance.
224- - `mean::Union{Nothing, Real, Vector{Float64}}=nothing`: if set to nothing(default)
225- centering will be computed and applied, if set to `0` no
226- centering(assumed pre-centered), if a vector is passed, the centering is done with
224+ - `mean::Union{Nothing, Real, Vector{Float64}}=nothing`: if set to nothing(default)
225+ centering will be computed and applied, if set to `0` no
226+ centering(assumed pre-centered), if a vector is passed, the centering is done with
227227 that vector.
228228"""
229229@mlj_model mutable struct PPCA <: MMI.Unsupervised
@@ -278,14 +278,14 @@ $PPCA_DESCR
278278# Keyword Parameters
279279
280280- `method::Symbol=:cm`: Method to use to solve the problem, one of `:ml`, `:em`, `:bayes`.
281- - `maxoutdim::Int=0`: Maximum number of output dimensions, uses max(no_of_features - 1, 1)
281+ - `maxoutdim::Int=0`: Maximum number of output dimensions, uses max(no_of_features - 1, 1)
282282 if 0 (default).
283283- `maxiter::Int=1000`: Maximum number of iterations.
284284- `tol::Real=1e-6`: Convergence tolerance.
285285- `eta::Real=tol`: Variance lower bound
286- - `mean::Union{Nothing, Real, Vector{Float64}}=nothing`: If set to nothing(default)
287- centering will be computed and applied, if set to `0` no
288- centering(assumed pre-centered), if a vector is passed, the centering is done with
286+ - `mean::Union{Nothing, Real, Vector{Float64}}=nothing`: If set to nothing(default)
287+ centering will be computed and applied, if set to `0` no
288+ centering(assumed pre-centered), if a vector is passed, the centering is done with
289289 that vector.
290290"""
291291@mlj_model mutable struct FactorAnalysis <: MMI.Unsupervised
0 commit comments