From d5d75f41d5d614f7af46149681daeaa65e1b9c5d Mon Sep 17 00:00:00 2001 From: Thomas Wutzler Date: Fri, 3 Nov 2023 11:33:25 +0100 Subject: [PATCH 1/2] add SpellCheck github action --- .github/workflows/.typos.toml | 6 ++++++ .github/workflows/SpellCheck.yml | 14 ++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 .github/workflows/.typos.toml create mode 100644 .github/workflows/SpellCheck.yml diff --git a/.github/workflows/.typos.toml b/.github/workflows/.typos.toml new file mode 100644 index 0000000..39ae1ff --- /dev/null +++ b/.github/workflows/.typos.toml @@ -0,0 +1,6 @@ +[default.extend-words] +Missings = "Missings" +devide = "divide" +exluding = "excluding" + + diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml new file mode 100644 index 0000000..3c2bfb6 --- /dev/null +++ b/.github/workflows/SpellCheck.yml @@ -0,0 +1,14 @@ +name: Spell Check + +on: [pull_request] + +jobs: + typos-check: + name: Spell Check with Typos + runs-on: ubuntu-latest + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v4 + - name: Check spelling + uses: crate-ci/typos@master + \ No newline at end of file From cc665a54e3ed2f3b7a6042e0dfc25542f287cbb3 Mon Sep 17 00:00:00 2001 From: Thomas Wutzler Date: Fri, 3 Nov 2023 11:34:04 +0100 Subject: [PATCH 2/2] fix typos --- README.md | 2 +- docs/src/logitnormal.md | 4 ++-- docs/src/partype.md | 2 +- jmd/fitModeFlat.jmd | 2 +- src/fitstats.jl | 2 +- src/univariate/continuous/estimateMoments.jl | 2 +- src/univariate/continuous/logitnormal.jl | 6 +++--- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 5ed6e3c..934d2a1 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ to This can also be used to approximate one distribution via a different distribution by matching its moments. -User needs to [explicitly using Optim.jl](https://bgctw.github.io/DistributionFits.jl/stable/set_optimize/) for DitributionFits.jl to work properly: +User needs to [explicitly using Optim.jl](https://bgctw.github.io/DistributionFits.jl/stable/set_optimize/) for DistributionFits.jl to work properly: ```julia using DistributionFits, Optim ``` diff --git a/docs/src/logitnormal.md b/docs/src/logitnormal.md index a5aaf01..4ed12fb 100644 --- a/docs/src/logitnormal.md +++ b/docs/src/logitnormal.md @@ -29,14 +29,14 @@ However, user might have an idea of the spread, or the inverse: peakedness, of the distribution. With increasing spread, the logitnormal distribution becomes bimodal. -The following functiion estimates the most spread, i.e most +The following function estimates the most spread, i.e most flat distribution that has a single mode at the given location. ```@docs fit_mode_flat ``` -The found maximum spread parameter, σ, is devided by the peakedness +The found maximum spread parameter, σ, is divided by the peakedness argument to specify distributions given the mode that are more peaked. diff --git a/docs/src/partype.md b/docs/src/partype.md index 93e173e..24ca490 100644 --- a/docs/src/partype.md +++ b/docs/src/partype.md @@ -18,7 +18,7 @@ partype(d) == Float32 true ``` -## Infering the parametric type from other arguments. +## Inferring the parametric type from other arguments. If the parametric type is omitted, default Float64 is assumed, or inferred from other parameters of the fitting function. diff --git a/jmd/fitModeFlat.jmd b/jmd/fitModeFlat.jmd index c275f2e..e8281ae 100644 --- a/jmd/fitModeFlat.jmd +++ b/jmd/fitModeFlat.jmd @@ -56,7 +56,7 @@ $$ \end{aligned} $$ -Analytically solving for $x_t$ is complicated by $x_t$ occuring outside and +Analytically solving for $x_t$ is complicated by $x_t$ occurring outside and inside the logit function. However, we can use the constraint to determine $x_t$ by numerical optimization, minimizing the difference between the right and the left hand side. diff --git a/src/fitstats.jl b/src/fitstats.jl index e237fcd..1d291a4 100644 --- a/src/fitstats.jl +++ b/src/fitstats.jl @@ -70,7 +70,7 @@ Base.eltype(::Moments{N, T}) where {N, T} = T Get the first N moments of a distribution. -Procudes an object of type [`AbstractMoments`](@ref). +Produces an object of type [`AbstractMoments`](@ref). ## Examples ```julia diff --git a/src/univariate/continuous/estimateMoments.jl b/src/univariate/continuous/estimateMoments.jl index cd61cee..817b09f 100644 --- a/src/univariate/continuous/estimateMoments.jl +++ b/src/univariate/continuous/estimateMoments.jl @@ -30,7 +30,7 @@ function meanFunOfProb(d::ContinuousUnivariateDistribution; #---|---|---|---# # |---|---|---| # # we need to add points for δ/4 and 1-δ/4 representing the edges - # but their weight is only half, because they represents half an inverval + # but their weight is only half, because they represents half an interval #m = sum(c_i*δ) + el*(δ/2) + er*(δ/2) = (sum(c_i) + er/2 + el/2)*δ s = sum(fun.(d, p)) # sum at points c_i el = fun(d, δ / 4) # diff --git a/src/univariate/continuous/logitnormal.jl b/src/univariate/continuous/logitnormal.jl index 3cd38cc..5d62dfe 100644 --- a/src/univariate/continuous/logitnormal.jl +++ b/src/univariate/continuous/logitnormal.jl @@ -60,8 +60,8 @@ function matchModeUpper(mode::T, qp::QuantilePoint, ::Val{nTry}) where {nTry, T oF(mu) = ofLogitNormalModeUpper(mu, mode, logitMode, logitUpper, perc) ofMuTry = oF.(muTry) iMin = argmin(ofMuTry) - # on postive side muTry are increasing, on negative side muTry decreasing - # neet to have the lower value at the beginning of the interval + # on positive side muTry are increasing, on negative side muTry decreasing + # need to have the lower value at the beginning of the interval interval = (logitMode >= 0) ? (muTry[max(1, iMin - 1)], muTry[min(nTry, iMin + 1)]) : (muTry[max(1, iMin + 1)], muTry[min(nTry, max(1, iMin - 1))]) @@ -96,7 +96,7 @@ end Find the maximum-spread logitnormal distribution that has a single mode at given location. -More peaked distributions with given single mode can be optained by increasing +More peaked distributions with given single mode can be obtained by increasing argument peakedness. They will have a spread by originally inferred σ² devidied by peakedness.