pydata / pydata/patsy

Implement an option for factor-based prediction

Open
#63 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

statsmodels-request well-defined-task-definitely-do-this
Dominant language
Python
Stars
990
Forks
106
Avg merge
7d 34m
Merged PRs (30d)
1

Description

Right now we can do prediction (i.e., design matrix generation) by specifying a set of data values ({"x": 1, "y": 2}). But for some purposes, like generating all pairwise categorical significance tests ("is the value of my linear predictor significantly different at a == a1 than it is at a == a2?"), it would be nice to be able to write this in terms of factor values ("is the value of my linear predictor significantly different when the C(...) factor is on level a1 compared to when it's on level a2?", without having to grovel through the AST of the factor's python code to figure out which data variables are being accessed. In particular, this would be expressed at the same representational level as factor-level metadata (see #61).

So we should have a version of predict that takes a set of specifications for factor values, and goes from there.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing prediction and design-matrix APIs, then compare their representation with the factor-level metadata discussed in issue #61. Define how factor-value specifications should map to prediction inputs and what pairwise categorical comparisons must produce; the issue names no files or tests to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.