|
@@ -0,0 +1,78 @@
|
|
|
+// TODO
|
|
|
+// use speech rates to set priors on truth_vocs
|
|
|
+data {
|
|
|
+ int<lower=1> n_classes; // number of classes
|
|
|
+
|
|
|
+ // analysis data block
|
|
|
+ int<lower=1> n_recs;
|
|
|
+ int<lower=1> n_children;
|
|
|
+
|
|
|
+ array[n_recs] int<lower=1> children;
|
|
|
+ array[n_recs] real<lower=1> age;
|
|
|
+ array[n_recs] int<lower=-1> siblings;
|
|
|
+ array[n_children] int<lower=1> corpus;
|
|
|
+
|
|
|
+ real<lower=0> recs_duration;
|
|
|
+
|
|
|
+ // speaker confusion data block
|
|
|
+ int<lower=1> n_clips; // number of clips
|
|
|
+ int<lower=1> n_groups; // number of groups
|
|
|
+ int<lower=1> n_corpora;
|
|
|
+
|
|
|
+ int<lower=0> n_validation;
|
|
|
+
|
|
|
+ // actual speech rates
|
|
|
+ int<lower=1> n_rates;
|
|
|
+ int<lower=1> n_speech_rate_children;
|
|
|
+
|
|
|
+ array [n_rates,n_classes] int<lower=0> speech_rates;
|
|
|
+ array [n_rates] int group_corpus;
|
|
|
+ vector<lower=0>[n_rates] durations;
|
|
|
+ array [n_rates] real<lower=0> speech_rate_age;
|
|
|
+ array [n_rates] int<lower=-1> speech_rate_siblings;
|
|
|
+ array [n_rates] int<lower=1,upper=n_speech_rate_children> speech_rate_child;
|
|
|
+
|
|
|
+ // parallel processing
|
|
|
+ int<lower=1> threads;
|
|
|
+}
|
|
|
+
|
|
|
+transformed data {
|
|
|
+ array[n_speech_rate_children] int<lower=1> speech_rate_child_corpus;
|
|
|
+
|
|
|
+ array[n_children] int<lower=-1> child_siblings;
|
|
|
+ array[n_speech_rate_children] int<lower=-1> speech_rate_child_siblings;
|
|
|
+ int no_siblings = 0;
|
|
|
+ int has_siblings = 0;
|
|
|
+
|
|
|
+ for (k in 1:n_rates) {
|
|
|
+ speech_rate_child_corpus[speech_rate_child[k]] = group_corpus[k];
|
|
|
+ }
|
|
|
+
|
|
|
+ for (k in 1:n_recs) {
|
|
|
+ child_siblings[children[k]] = siblings[k];
|
|
|
+ }
|
|
|
+
|
|
|
+ for (c in 1:n_children) {
|
|
|
+ if (child_siblings[c] == 0) {
|
|
|
+ no_siblings += 1;
|
|
|
+ }
|
|
|
+ else if (child_siblings[c] > 0) {
|
|
|
+ has_siblings += 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ for (k in 1:n_rates) {
|
|
|
+ speech_rate_child_siblings[speech_rate_child[k]] = speech_rate_siblings[k];
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+parameters {
|
|
|
+ #include "blocks/behavior_model_parameters_adu.stan"
|
|
|
+ #include "blocks/human_annotations_parameters_adu.stan"
|
|
|
+}
|
|
|
+
|
|
|
+model {
|
|
|
+ //actual model
|
|
|
+ #include "blocks/behavior_model_priors_adu.stan"
|
|
|
+ #include "blocks/human_annotations_adu.stan"
|
|
|
+}
|