get_perf: Calculate Luce Choice (Proportion Correct) for Each Item in a...

View source: R/helper.R

get_perfR Documentation

Calculate Luce Choice (Proportion Correct) for Each Item in a Model Knowledge Matrix

Description

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.

Usage

get_perf(m)

Arguments

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.

Value

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.


kachergis/XSLmodels documentation built on Feb. 25, 2024, 10:43 p.m.