Getting started with IXPLORE

IXPLORE is a Python package for bounded ideal point estimation with grid-based uncertainty quantification (Bachmann, 2026). It jointly embeds users and questionnaire items in a shared 2D latent space: each item defines a logistic regression decision boundary, and each user receives a posterior distribution over the bounded map. This post is a minimal walkthrough of the basic usage. The design rationale and the full API reference live in the documentation, and the technical report is on arXiv.

Installation

pip install ixplore

IXPLORE requires Python 3.14 or newer and depends only on numpy, pandas, scipy, and matplotlib.

Basic usage

The input is a user-item reaction matrix: one row per user, one column per item, with binary (agree/disagree) or Likert-scale responses. Likert values are normalized to the range [0, 1], and missing values are allowed.

import pandas as pd
from ixplore import IXPLORE

# users × items matrix with values in {0, 1} or on a Likert scale
reactions = pd.read_csv('likert_reactions.csv', index_col=0)

# initialize (here with PCA) and refine with a few iterations
model = IXPLORE(reactions, pca_initialization=True, random_state=17)
model.iterate(n_iterations=5)

embedding  = model.get_embedding()   # user positions (N × 2), columns ['x', 'y']
parameters = model.get_parameters()  # item parameters (K × 3), columns ['beta1', 'beta2', 'alpha']

# embed a new user from (partial) answers, and impute the rest
answers  = pd.Series({'Q1': 0.8, 'Q2': 0.2, 'Q3': 0.6}, name='new_user')
position = model.embed(answers)
imputed  = model.impute_answers(answers)

Each iteration alternates between two steps: fitting a posterior distribution for every user given the current item models (fit_posteriors), and fitting a logistic regression for every item given the current user positions (fit_models). The walkthrough below runs these steps one at a time on synthetic Likert data, so you can watch the map take shape.

Walkthrough

The notebook is adapted from demo.ipynb in the repository, where you also find the data and further notebooks on priors, weights, non-linear features, distortion metrics, and runtime.