Skip to content

Commit

Permalink
correct name of function
Browse files Browse the repository at this point in the history
  • Loading branch information
DominiqueMakowski committed Jul 14, 2024
1 parent c14b7af commit 06cedb3
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 14 deletions.
Binary file modified content/.jupyter_cache/global.db
Binary file not shown.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/.quarto/cites/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"3_scales.qmd":["makowski2023novel"],"4b_rt_generative.qmd":[],"3b_choices.qmd":[],"3a_scales.qmd":["makowski2023novel"],"4_rt.qmd":["wagenmakers2008diffusion","heathcote2012linear","theriault2024check","lo2015transform","schramm2019reaction","balota2011moving","matzke2009psychological","hohle1965inferred","kieffaber2006switch","matzke2009psychological","schwarz2001ex","heathcote2004fitting","anders2016shifted"],"4_1_Normal.qmd":["wagenmakers2008diffusion","theriault2024check","lo2015transform","schramm2019reaction"],"4a_rt_descriptive.qmd":["wagenmakers2008diffusion","heathcote2012linear","theriault2024check","wiemann2023using","lo2015transform","schramm2019reaction","wagenmakers2005relation","limpert2001log","balota2011moving","matzke2009psychological","hohle1965inferred","kieffaber2006switch","matzke2009psychological","schwarz2001ex","heathcote2004fitting","anders2016shifted"],"5_individual.qmd":[],"1_introduction.qmd":[],"2_predictors.qmd":[],"index.qmd":[],"references.qmd":[]}
{"1_introduction.qmd":[],"references.qmd":[],"2_predictors.qmd":[],"4b_rt_generative.qmd":[],"3b_choices.qmd":[],"3_scales.qmd":["makowski2023novel"],"5_individual.qmd":[],"4a_rt_descriptive.qmd":["wagenmakers2008diffusion","heathcote2012linear","theriault2024check","wiemann2023using","lo2015transform","schramm2019reaction","wagenmakers2005relation","limpert2001log","balota2011moving","matzke2009psychological","hohle1965inferred","kieffaber2006switch","matzke2009psychological","schwarz2001ex","heathcote2004fitting","anders2016shifted"],"index.qmd":[],"4_1_Normal.qmd":["wagenmakers2008diffusion","theriault2024check","lo2015transform","schramm2019reaction"],"3a_scales.qmd":["makowski2023novel"],"4_rt.qmd":["wagenmakers2008diffusion","heathcote2012linear","theriault2024check","lo2015transform","schramm2019reaction","balota2011moving","matzke2009psychological","hohle1965inferred","kieffaber2006switch","matzke2009psychological","schwarz2001ex","heathcote2004fitting","anders2016shifted"]}
2 changes: 1 addition & 1 deletion content/.quarto/idx/4a_rt_descriptive.qmd.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/.quarto/xref/04307669
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"options":{"chapters":true},"headings":[],"entries":[]}
{"entries":[],"options":{"chapters":true},"headings":[]}
2 changes: 1 addition & 1 deletion content/.quarto/xref/1a47137c
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"options":{"chapters":true},"headings":["extracting-individual-parameters-from-mixed-models","population-informed-individual-bayesian-models","task-reliability"],"entries":[]}
{"entries":[],"options":{"chapters":true},"headings":["extracting-individual-parameters-from-mixed-models","population-informed-individual-bayesian-models","task-reliability"]}
2 changes: 1 addition & 1 deletion content/.quarto/xref/26afb962
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"entries":[],"headings":["categorical-predictors-condition-group","interactions","ordered-predictors-likert-scales","non-linear-relationships","polynomials","generalized-additive-models-gams"],"options":{"chapters":true}}
{"headings":["categorical-predictors-condition-group","interactions","ordered-predictors-likert-scales","non-linear-relationships","polynomials","generalized-additive-models-gams"],"entries":[],"options":{"chapters":true}}
2 changes: 1 addition & 1 deletion content/.quarto/xref/26e6880e
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"options":{"chapters":true},"entries":[],"headings":["the-data","gaussian-aka-linear-model","model-specification","posterior-predictive-check","scaled-gaussian-model","solution-1-directional-effect-of-condition","solution-2-avoid-exploring-negative-variance-values","solution-3-use-a-softplus-link-function","exponential-transformation","softplus-function","the-model","conclusion","the-problem-with-linear-models","shifted-lognormal-model","prior-on-minimum-rt","model-specification-1","interpretation","exgaussian-model","conditional-tau-tau-parameter","interpretation-1","shifted-wald-model","model-specification-2","model-comparison","shifted-lognormal-mixed-model"]}
{"entries":[],"headings":["the-data","gaussian-aka-linear-model","model-specification","posterior-predictive-check","scaled-gaussian-model","solution-1-directional-effect-of-condition","solution-2-avoid-exploring-negative-variance-values","solution-3-use-a-softplus-function","exponential-transformation","softplus-function","the-model","conclusion","the-problem-with-linear-models","shifted-lognormal-model","prior-on-minimum-rt","model-specification-1","interpretation","exgaussian-model","conditional-tau-tau-parameter","interpretation-1","shifted-wald-model","model-specification-2","model-comparison","shifted-lognormal-mixed-model"],"options":{"chapters":true}}
2 changes: 1 addition & 1 deletion content/.quarto/xref/a408ff3e
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"headings":["evidence-accumulation","wald-distribution-revisited","drift-diffusion-model-ddm","linear-ballistic-accumulator-lba","other-models-lnr-rdm","including-random-effects","random-intercept","random-slopes","performance-tips","additional-resources"],"entries":[],"options":{"chapters":true}}
{"headings":["evidence-accumulation","wald-distribution-revisited","drift-diffusion-model-ddm","linear-ballistic-accumulator-lba","other-models-lnr-rdm","including-random-effects","random-intercept","random-slopes","performance-tips","additional-resources"],"options":{"chapters":true},"entries":[]}
6 changes: 3 additions & 3 deletions content/4a_rt_descriptive.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ hpd(chain_ScaledGaussian; alpha=0.05)
```


### Solution 3: Use a "Softplus" Link Function
### Solution 3: Use a "Softplus" Function

#### Exponential Transformation

Expand All @@ -256,7 +256,7 @@ We have seen example of applying "non-identity" **link functions** in the previo
What function could we use to transform any values of *sigma* $\sigma$ into stricly positive values?
One option that has been used is to express the parameter on the log-scale (which can include negative values) for priors and effects, and apply an "exponential" transformation to the parameter at the end.

The issue with the **exponential link** (**TODO**: is it actually known as an "exponential" link or a "log" link?) is that 1) it quickly generates very big numbers (which can slow down sampling efficiency), 2) The interpretation of the parameters and effects are not linear, which can add up to the complexity, and 3) normal priors on the log scale lead to a sharp peak in "real" values that can be problematic.
The issue with the **log link** (i.e., expressing parameters on the log-scale and then transforming them using the exponential function) is that 1) it quickly generates very big numbers (which can slow down sampling efficiency), 2) The interpretation of the parameters and effects are not linear, which can add up to the complexity, and 3) normal priors on the log scale lead to a sharp peak in "real" values that can be problematic.


```{julia}
Expand All @@ -276,7 +276,7 @@ fig
#### Softplus Function

Popularized by the machine learning field, the **Softplus** function is an interesting alternative [see @wiemann2023using].
It is defined as $softplus(x) = \log(1 + \exp(x))$ and its main benefit is to approximate an "identity" link (i.e., a linear relationship), only impacting the values close to 0 (where it is not linear) and negative values.
It is defined as $softplus(x) = \log(1 + \exp(x))$ and its main benefit is to approximate an "identity" link for larger values (i.e., a linear relationship), only impacting negative values and values close to 0 (where the link is not linear).

```{julia}
xaxis = range(-6, 6, length=1000)
Expand Down
4 changes: 2 additions & 2 deletions content/_freeze/4a_rt_descriptive/execute-results/html.json

Large diffs are not rendered by default.

0 comments on commit 06cedb3

Please sign in to comment.