This package implements Split Conformal Prediction adapted for Strategic Classification settings.
To install the package, follow these steps:
- Navigate to the project root directory (where
setup.pyis located). - Install the package using
pip.
If you want to modify the code and have the changes reflected immediately:
pip install -e .pip install .The installation command will automatically install the required dependencies listed in setup.py:
- pandas
- numpy
- scikit-learn
- matplotlib
- seaborn
- torch
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
# ...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 theLinearModeland loss functions (HingeLoss,StrategicHingeLoss).scp/plots.py: Utilities for visualizing decision boundaries and results.scp/trainer.py: Implements theStrategicTrainerclass for training models with strategic awareness.
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.