Skip to content

Commit

Permalink
run spell check
Browse files Browse the repository at this point in the history
  • Loading branch information
ablaom committed Feb 1, 2023
1 parent 659c032 commit 7c9e435
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 35 deletions.
26 changes: 13 additions & 13 deletions src/mlj/classifiers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ penalty:
Here ``L`` is either `MLJLinearModels.LogisticLoss` or `MLJLinearModels.MultiClassLoss`,
``λ`` and ``γ`` indicate
the strength of the L2 (resp. L1) regularisation components and
the strength of the L2 (resp. L1) regularization components and
``n`` is the number of training observations.
With `scale_penalty_with_samples = false` the objective function is instead
Expand Down Expand Up @@ -49,10 +49,10 @@ See also [`MultinomialClassifier`](@ref).
"""
@with_kw_noshow mutable struct LogisticClassifier <: MMI.Probabilistic
"strength of the regulariser if `penalty` is `:l2` or `:l1` and strength of the L2
regulariser if `penalty` is `:en`."
"strength of the regularizer if `penalty` is `:l2` or `:l1` and strength of the L2
regularizer if `penalty` is `:en`."
lambda::Real = eps()
"strength of the L1 regulariser if `penalty` is `:en`."
"strength of the L1 regularizer if `penalty` is `:en`."
gamma::Real = 0.0
"the penalty to use, either `:l2`, `:l1`, `:en` (elastic net) or `:none`."
penalty::SymStr = :l2
Expand All @@ -65,15 +65,15 @@ See also [`MultinomialClassifier`](@ref).
"""some instance of `MLJLinearModels.S` where `S` is one of: `LBFGS`, `Newton`,
`NewtonCG`, `ProxyGrad`; but subject to the following restrictions:
- If `gamma > 0` (L1 norm penalized) then `ProxyGrad` is dissallowed.
- If `gamma > 0` (L1 norm penalized) then `ProxyGrad` is disallowed.
- Unless `scitype(y) <: Finite{2}` (binary target) `Newton` is dissallowed.
- Unless `scitype(y) <: Finite{2}` (binary target) `Newton` is disallowed.
If `solver = nothing` (default) then `ProxyGrad(accel=true)` (FISTA) is used,
unless `gamma = 0`, in which case `LBFGS()` is used.
Solver aliases: `FISTA(; kwargs...) = ProxyGrad(accel=true, kwargs...)`,
`ISTA(; kwargs) = ProxyGrad(accel=false, kwargs...)`"""
`ISTA(; kwargs...) = ProxyGrad(accel=false, kwargs...)`"""
solver::Option{Solver} = nothing
end

Expand Down Expand Up @@ -125,10 +125,10 @@ See also [`LogisticClassifier`](@ref).
"""
@with_kw_noshow mutable struct MultinomialClassifier <: MMI.Probabilistic
"strength of the regulariser if `penalty` is `:l2` or `:l1`.
Strength of the L2 regulariser if `penalty` is `:en`."
"strength of the regularizer if `penalty` is `:l2` or `:l1`.
Strength of the L2 regularizer if `penalty` is `:en`."
lambda::Real = eps()
"strength of the L1 regulariser if `penalty` is `:en`."
"strength of the L1 regularizer if `penalty` is `:en`."
gamma::Real = 0.0
"the penalty to use, either `:l2`, `:l1`, `:en` (elastic net) or `:none`."
penalty::SymStr = :l2
Expand All @@ -141,15 +141,15 @@ See also [`LogisticClassifier`](@ref).
"""some instance of `MLJLinearModels.S` where `S` is one of: `LBFGS`,
`NewtonCG`, `ProxyGrad`; but subject to the following restrictions:
- If `gamma > 0` (L1 norm penalized) then `ProxyGrad` is dissallowed.
- If `gamma > 0` (L1 norm penalized) then `ProxyGrad` is disallowed.
- Unless `scitype(y) <: Finite{2}` (binary target) `Newton` is dissallowed.
- Unless `scitype(y) <: Finite{2}` (binary target) `Newton` is disallowed.
If `solver = nothing` (default) then `ProxyGrad(accel=true)` (FISTA) is used,
unless `gamma = 0`, in which case `LBFGS()` is used.
Solver aliases: `FISTA(; kwargs...) = ProxyGrad(accel=true, kwargs...)`,
`ISTA(; kwargs) = ProxyGrad(accel=false, kwargs...)`"""
`ISTA(; kwargs...) = ProxyGrad(accel=false, kwargs...)`"""
solver::Option{Solver} = nothing
end

Expand Down
44 changes: 22 additions & 22 deletions src/mlj/regressors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ See also [`ElasticNetRegressor`](@ref).
"""
@with_kw_noshow mutable struct RidgeRegressor <: MMI.Deterministic
"strength of the L2 regularisation."
"strength of the L2 regularization."
lambda::Real = 1.0
"whether to fit the intercept or not."
fit_intercept::Bool = true
Expand Down Expand Up @@ -162,7 +162,7 @@ See also [`ElasticNetRegressor`](@ref).
"""
@with_kw_noshow mutable struct LassoRegressor <: MMI.Deterministic
"strength of the L1 regularisation."
"strength of the L1 regularization."
lambda::Real = 1.0
"whether to fit the intercept or not."
fit_intercept::Bool = true
Expand All @@ -173,7 +173,7 @@ See also [`ElasticNetRegressor`](@ref).
"""any instance of `MLJLinearModels.ProxGrad`.
If `solver=nothing` (default) then `ProxyGrad(accel=true)` (FISTA) is used.
Solver aliases: `FISTA(; kwargs...) = ProxyGrad(accel=true, kwargs...)`,
`ISTA(; kwargs) = ProxyGrad(accel=false, kwargs...)`. """
`ISTA(; kwargs...) = ProxyGrad(accel=false, kwargs...)`. """
solver::Option{Solver} = nothing
end

Expand Down Expand Up @@ -231,9 +231,9 @@ See also [`LassoRegressor`](@ref).
"""
@with_kw_noshow mutable struct ElasticNetRegressor <: MMI.Deterministic
"strength of the L2 regularisation."
"strength of the L2 regularization."
lambda::Real = 1.0
"strength of the L1 regularisation."
"strength of the L1 regularization."
gamma::Real = 0.0
"whether to fit the intercept or not."
fit_intercept::Bool = true
Expand All @@ -246,7 +246,7 @@ See also [`LassoRegressor`](@ref).
If `solver=nothing` (default) then `ProxyGrad(accel=true)` (FISTA) is used.
Solver aliases: `FISTA(; kwargs...) = ProxyGrad(accel=true, kwargs...)`,
`ISTA(; kwargs) = ProxyGrad(accel=false, kwargs...)`. """
`ISTA(; kwargs...) = ProxyGrad(accel=false, kwargs...)`. """
solver::Option{Solver} = nothing
end

Expand Down Expand Up @@ -309,10 +309,10 @@ See also [`HuberRegressor`](@ref), [`QuantileRegressor`](@ref).
`BisquareRho`, `FairRho`, `HuberRho`, `LogisticRho`,
`QuantileRho`, `TalwarRho`, `HuberRho`, `TalwarRho`. "
rho::RobustRho = HuberRho(0.1)
"strength of the regulariser if `penalty` is `:l2` or `:l1`.
Strength of the L2 regulariser if `penalty` is `:en`."
"strength of the regularizer if `penalty` is `:l2` or `:l1`.
Strength of the L2 regularizer if `penalty` is `:en`."
lambda::Real = 1.0
"strength of the L1 regulariser if `penalty` is `:en`."
"strength of the L1 regularizer if `penalty` is `:en`."
gamma::Real = 0.0
"the penalty to use, either `:l2`, `:l1`, `:en` (elastic net) or `:none`."
penalty::SymStr = :l2
Expand All @@ -330,7 +330,7 @@ See also [`HuberRegressor`](@ref), [`QuantileRegressor`](@ref).
unless `gamma = 0`, in which case `LBFGS()` is used.
Solver aliases: `FISTA(; kwargs...) = ProxyGrad(accel=true, kwargs...)`,
`ISTA(; kwargs) = ProxyGrad(accel=false, kwargs...)`"""
`ISTA(; kwargs...) = ProxyGrad(accel=false, kwargs...)`"""
solver::Option{Solver} = nothing
end

Expand Down Expand Up @@ -384,10 +384,10 @@ See also [`RobustRegressor`](@ref), [`QuantileRegressor`](@ref).
"parameterizes the `HuberRho` function (radius of the ball within which the loss
is a quadratic loss)"
delta::Real = 0.5
"strength of the regulariser if `penalty` is `:l2` or `:l1`.
Strength of the L2 regulariser if `penalty` is `:en`."
"strength of the regularizer if `penalty` is `:l2` or `:l1`.
Strength of the L2 regularizer if `penalty` is `:en`."
lambda::Real = 1.0
"strength of the L1 regulariser if `penalty` is `:en`."
"strength of the L1 regularizer if `penalty` is `:en`."
gamma::Real = 0.0
"the penalty to use, either `:l2`, `:l1`, `:en` (elastic net) or `:none`."
penalty::SymStr = :l2
Expand All @@ -405,7 +405,7 @@ See also [`RobustRegressor`](@ref), [`QuantileRegressor`](@ref).
unless `gamma = 0`, in which case `LBFGS()` is used.
Solver aliases: `FISTA(; kwargs...) = ProxyGrad(accel=true, kwargs...)`,
`ISTA(; kwargs) = ProxyGrad(accel=false, kwargs...)`"""
`ISTA(; kwargs...) = ProxyGrad(accel=false, kwargs...)`"""
solver::Option{Solver} = nothing
end

Expand Down Expand Up @@ -459,10 +459,10 @@ See also [`RobustRegressor`](@ref), [`HuberRegressor`](@ref).
"parameterizes the `QuantileRho` function (indicating the quantile to use
with default `0.5` for the median regression)"
delta::Real = 0.5
"strength of the regulariser if `penalty` is `:l2` or `:l1`.
Strength of the L2 regulariser if `penalty` is `:en`."
"strength of the regularizer if `penalty` is `:l2` or `:l1`.
Strength of the L2 regularizer if `penalty` is `:en`."
lambda::Real = 1.0
"strength of the L1 regulariser if `penalty` is `:en`."
"strength of the L1 regularizer if `penalty` is `:en`."
gamma::Real = 0.0
"the penalty to use, either `:l2`, `:l1`, `:en` (elastic net) or `:none`."
penalty::SymStr = :l2
Expand All @@ -480,7 +480,7 @@ See also [`RobustRegressor`](@ref), [`HuberRegressor`](@ref).
unless `gamma = 0`, in which case `LBFGS()` is used.
Solver aliases: `FISTA(; kwargs...) = ProxyGrad(accel=true, kwargs...)`,
`ISTA(; kwargs) = ProxyGrad(accel=false, kwargs...)`"""
`ISTA(; kwargs...) = ProxyGrad(accel=false, kwargs...)`"""
solver::Option{Solver} = nothing
end

Expand Down Expand Up @@ -539,10 +539,10 @@ $TYPEDFIELDS
$(example_docstring("LADRegressor"))
"""
@with_kw_noshow mutable struct LADRegressor <: MMI.Deterministic
"strength of the regulariser if `penalty` is `:l2` or `:l1`.
Strength of the L2 regulariser if `penalty` is `:en`."
"strength of the regularizer if `penalty` is `:l2` or `:l1`.
Strength of the L2 regularizer if `penalty` is `:en`."
lambda::Real = 1.0
"strength of the L1 regulariser if `penalty` is `:en`."
"strength of the L1 regularizer if `penalty` is `:en`."
gamma::Real = 0.0
"the penalty to use, either `:l2`, `:l1`, `:en` (elastic net) or `:none`."
penalty::SymStr = :l2
Expand All @@ -560,7 +560,7 @@ $(example_docstring("LADRegressor"))
unless `gamma = 0`, in which case `LBFGS()` is used.
Solver aliases: `FISTA(; kwargs...) = ProxyGrad(accel=true, kwargs...)`,
`ISTA(; kwargs) = ProxyGrad(accel=false, kwargs...)`"""
`ISTA(; kwargs...) = ProxyGrad(accel=false, kwargs...)`"""
solver::Option{Solver} = nothing
end

Expand Down

0 comments on commit 7c9e435

Please sign in to comment.