You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/bayesian.jl
+58-60Lines changed: 58 additions & 60 deletions
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,9 @@ A model object for the Bayesian model.
14
14
- `λ_sk_s`: diffusion for stimulus s when s is evaluated first
15
15
- `n_states`: the number of evidence states
16
16
"""
17
-
struct BayesianModel{T<:Real} <:Model
17
+
struct BayesianModel{T<:Real} <:Model
18
18
μk::T
19
-
μs::T
19
+
μs::T
20
20
σk::T
21
21
σs::T
22
22
υ_ks_k::T
@@ -26,48 +26,46 @@ struct BayesianModel{T<:Real} <: Model
26
26
n_states::Int
27
27
end
28
28
29
-
functionBayesianModel(;μk,
30
-
μs,
31
-
σk,
32
-
σs,
33
-
υ_ks_k,
34
-
υ_sk_s,
35
-
λ_ks_k,
36
-
λ_sk_s,
37
-
n_states)
38
-
29
+
functionBayesianModel(; μk,
30
+
μs,
31
+
σk,
32
+
σs,
33
+
υ_ks_k,
34
+
υ_sk_s,
35
+
λ_ks_k,
36
+
λ_sk_s,
37
+
n_states)
39
38
returnBayesianModel(μk,
40
-
μs,
41
-
σk,
42
-
σs,
43
-
υ_ks_k,
44
-
υ_sk_s,
45
-
λ_ks_k,
46
-
λ_sk_s,
47
-
n_states)
39
+
μs,
40
+
σk,
41
+
σs,
42
+
υ_ks_k,
43
+
υ_sk_s,
44
+
λ_ks_k,
45
+
λ_sk_s,
46
+
n_states)
48
47
end
49
48
50
49
functionBayesianModel(
51
50
μk,
52
-
μs,
53
-
σk,
54
-
σs,
55
-
υ_ks_k,
51
+
μs,
52
+
σk,
53
+
σs,
54
+
υ_ks_k,
56
55
υ_sk_s,
57
56
λ_ks_k,
58
57
λ_sk_s,
59
58
n_states)
60
-
61
-
parms =promote(
59
+
parms =promote(
62
60
μk,
63
-
μs,
64
-
σk,
65
-
σs,
66
-
υ_ks_k,
61
+
μs,
62
+
σk,
63
+
σs,
64
+
υ_ks_k,
67
65
υ_sk_s,
68
66
λ_ks_k,
69
67
λ_sk_s)
70
-
68
+
71
69
returnBayesianModel(parms..., n_states)
72
70
end
73
71
@@ -95,11 +93,11 @@ distribution of rating both stimuli in two orders. The joint distributions are a
95
93
4. The joint probability distribution for k then s given stimulus s where element `pred[i,j]` is the probability of rating stimulus `s` as `i` and stimulus `k` as `j`
96
94
"""
97
95
functionpredict(model::BayesianModel{T}, n_options) where {T}
0 commit comments