metadpy.sdt.dprime#

metadpy.sdt.dprime(data: DataFrame, stimuli: str, responses: str, hit_rate: None, fa_rate: None) float[source]#
metadpy.sdt.dprime(data: None, stimuli: None, responses: None, hit_rate: float, fa_rate: float) float
metadpy.sdt.dprime(data: None, stimuli: Union[list, ndarray], responses: Union[list, ndarray], hit_rate: None, fa_rate: None) float

Calculate d prime.

Parameters
data

Dataframe. Note that this function can also directly be used as a Pandas method, in which case this argument is no longer needed.

hit_rate

Hit rate.

fa_rate

False alarm rate.

stimuli

Name of the column containing the stimuli. If None and data is a pandas.DataFrame, will be set to Stimuli by default.

responses

Name of the column containing the responses. If None and data is a pandas.DataFrame, will be set to Responses by default.

Returns
dprime

The d’ value.

Raises
ValueError

If stimuli and responses are not srings when providing a data frame. If no data is provided.

Notes

The d’ is a measure of the ability to discriminate a signal from noise.