Skip to content

Commit

Permalink
update models
Browse files Browse the repository at this point in the history
  • Loading branch information
FredericBlum committed Apr 10, 2024
1 parent e936827 commit 384b97a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
6 changes: 5 additions & 1 deletion scripts/04_FinalModel.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ data <- read_tsv('data.tsv') %>%
ClusterInitial==1, 'initial', 'nonInitial')
))
) %>%
left_join(langs, by = join_by(Language==ID))
left_join(langs, by = join_by(Language==ID)) %>%
rename(
IPA = CLTS,
Family = name_macro_family
)

# Read in phylogenetic control
df_phylo <- read_rds("df-phylo.rds")
Expand Down
11 changes: 5 additions & 6 deletions scripts/04_FinalModel_CLTS.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,18 @@ library(ape)

langs <- read_csv('languages.csv')
data <- read_tsv('data.tsv') %>%
rename(
IPA = CLTS,
Family = name_macro_family
) %>%
mutate(
word_initial = as.factor(word_initial),
utt_initial = as.factor(utt_initial),
cluster = as.factor(ifelse(InCluster==0, 'single', ifelse(
ClusterInitial==1, 'initial', 'nonInitial')
))
) %>%
left_join(langs, by = join_by(Language==ID))

left_join(langs, by = join_by(Language==ID)) %>%
rename(
IPA = CLTS,
Family = name_macro_family
)

# Read in phylogenetic control
df_phylo <- read_rds("df-phylo.rds")
Expand Down
6 changes: 5 additions & 1 deletion scripts/04_FinalModel_noCluster.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ data <- read_tsv('data.tsv') %>%
word_initial = as.factor(word_initial),
utt_initial = as.factor(utt_initial)) %>%
filter(InCluster==0) %>%
left_join(langs, by = join_by(Language==ID))
left_join(langs, by = join_by(Language==ID)) %>%
rename(
IPA = CLTS,
Family = name_macro_family
)


# Read in phylogenetic control
Expand Down
6 changes: 5 additions & 1 deletion scripts/04_FinalModel_speaker.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ data <- read_tsv('data.tsv') %>%
ClusterInitial==1, 'initial', 'nonInitial')
))
) %>%
left_join(langs, by = join_by(Language==ID))
left_join(langs, by = join_by(Language==ID)) %>%
rename(
IPA = CLTS,
Family = name_macro_family
)


# Read in phylogenetic control
Expand Down

0 comments on commit 384b97a

Please sign in to comment.