| get_perf | R Documentation |
This function computes the Luce choice, or the proportion of correct selections, for each item in a given model knowledge matrix. It assesses the probability of correctly identifying each referent based on the knowledge matrix, providing a measure of model performance per item.
get_perf(m, d = NULL)
m |
A square matrix representing the model's knowledge, where rows correspond to words and columns correspond to referents. The diagonal elements represent correct associations, and off-diagonal elements represent incorrect associations. |
d |
Exponent for exponentiated choice rule |
Negative associations (possible in error-driven models such as
rescorla_wagner() and kalman_filter()) are treated as 0 before the
choice rule is applied – Luce choice is undefined for negative values,
and would otherwise yield "probabilities" outside [0, 1] – matching
predict_referent(). A word whose associations are then all 0 is
answered at chance (1 / ncol(m)).
A named numeric vector where each element corresponds to an item in the matrix. The value of each element represents the proportion of correct selections (Luce choice) for that item, calculated as the ratio of the correct association (diagonal element) to the total associations for that item.
x <- xsl_run(baseline(), get_example_ambiguous_condition())
mat <- x$fits[[1]]$matrix
get_perf(mat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.