Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SCP: Strategic Conformal Prediction

This package implements Split Conformal Prediction adapted for Strategic Classification settings.

Installation

To install the package, follow these steps:

  1. Navigate to the project root directory (where setup.py is located).
  2. Install the package using pip.

Editable Install (Recommended for Development)

If you want to modify the code and have the changes reflected immediately:

pip install -e .

Standard Install

pip install .

Dependencies

The installation command will automatically install the required dependencies listed in setup.py:

  • pandas
  • numpy
  • scikit-learn
  • matplotlib
  • seaborn
  • torch

Usage

You can import the package in your Python scripts or notebooks:

from scp.conformal import SplitConformalPrediction
from scp.trainer import StrategicTrainer
from scp.model import LinearModel
# ...

Project Structure

The package is organized as follows:

  • scp/conformal.py: Implements Split Conformal Prediction adapted for strategic data shifts.
  • scp/data.py: Contains functions for generating synthetic student data and creating PyTorch DataLoaders.
  • scp/delta.py: Defines the strategic response functions (LinearDelta, IdentityDelta) that model how agents modify their features.
  • scp/model.py: Defines the LinearModel and loss functions (HingeLoss, StrategicHingeLoss).
  • scp/plots.py: Utilities for visualizing decision boundaries and results.
  • scp/trainer.py: Implements the StrategicTrainer class for training models with strategic awareness.

Experiments

The main experiments and usage examples are located in the Jupyter Notebook:

  • experiment.ipynb: Runs the training pipeline, evaluates conformal prediction coverage, and compares naive vs. strategic models.

About

Strategic Conformal Prediction

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages