rsa.tuneDepthAlpha: Tune depth and alpha hyperparamters

Description Usage Arguments Value Examples

Description

Return a list with number of alpha * depths elements each element includes a tuple of (correlation, alpha, depth). Same basic call functionality as runDf()

Usage

1
2
3
4
rsa.tuneDepthAlpha(data, quantityVarName, semanticsVarName, itemVarName,
  groupName = NA, compareDataName, costsVarName = NA, priorsVarName = NA,
  depths = 1, alphas = 1, compareIndices = NA,
  usePriorEveryRecurse = TRUE)

Arguments

data,

tidied data

quantityVarName,

entity name we're quantifying over

semanticsVarName,

semantic values for inference computation

itemVarName,

unique items were comparing, probaby words

groupName,

grouping variable if we have one

compareDataName,

pragmatic judgments we're comparing to

costsVarName,

costs variable name

priorsVarName,

priors variable name

depths,

vector of depths (in integers) for tuning

alphas,

vector of alphas for tuning

compareIndices,

specific indices in data frame

usePriorEveryRecurse,

boolean incorporate priors during each full recursion

Value

list of length(alphas) * length(depths) tuples with (correlation, depth, alpha)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
d <- peloquinFrank_5Alts
alphas <- seq(1, 3, by = 0.1)
depths <- 1:3
checkWords <- c("some", "all", "good", "excellent", "liked", "loved", "memorable", "unforgettable",
"palatable", "delicious")
compareIndices <- which(peloquinFrank_5Alts$words %in% checkWords)
results <- rsa.tuneDepthAlpha(data = d, groupName = "scale",
quantityVarName = "stars", itemVarName = "words",
semanticsVarName = "speaker.p", compareDataName = "e11",
compareIndices = compareIndices, alphas = alphas, depths = depths)
head(results)
best <- which.max(unlist(lapply(results, function(i) i[[1]][1])))
results[[best]]

benpeloquin7/rrrsa documentation built on May 12, 2019, 2:08 p.m.