psychometric

Classes:

LogisticRegression(**kwargs)

Logistic Regression (aka logit, MaxEnt) classifier.

Subject(name, dir, file, new, biography)

Class for managing one subject’s data and protocol.

Functions:

calc_psychometric(data, var_x[, var_y])

Calculate a psychometric curve (logistic regression of var_y on var_x)

coerce_discrete(df, col[, mapping])

Coerce a discrete/string column of a pandas dataframe into numeric values

plot_psychometric(subject_protocols)

Plot psychometric curves for selected subjects, steps, and variables

calc_psychometric(data, var_x, var_y='response')[source]

Calculate a psychometric curve (logistic regression of var_y on var_x)

Parameters
  • data (pandas.DataFrame) – Subject data

  • var_x (str) – name of column to use as the discriminand

  • var_y (str) – name of the column for the response, usually ‘response’

Returns

parameters for logistic function

Return type

params (tup)

plot_psychometric(subject_protocols)[source]

Plot psychometric curves for selected subjects, steps, and variables

Typically called by Terminal.plot_psychometric().

Parameters

subject_protocols (list) – A list of tuples, each with

  • subject_id (str)

  • step_name (str)

  • variable (str)

Returns

altair.Chart