Skip to content

Commit

Permalink
Merge pull request #31 from bgctw/spellcheck
Browse files Browse the repository at this point in the history
Spellcheck
  • Loading branch information
bgctw authored Nov 3, 2023
2 parents 09c52ee + cc665a5 commit 91cbb95
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/.typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[default.extend-words]
Missings = "Missings"
devide = "divide"
exluding = "excluding"


14 changes: 14 additions & 0 deletions .github/workflows/SpellCheck.yml
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
4 changes: 2 additions & 2 deletions docs/src/logitnormal.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/partype.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion jmd/fitModeFlat.jmd
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/fitstats.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/univariate/continuous/estimateMoments.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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) #
Expand Down
6 changes: 3 additions & 3 deletions src/univariate/continuous/logitnormal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))])
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 91cbb95

Please sign in to comment.