Skip to content

A unified implementation of quantification and unfolding algorithms

Notifications You must be signed in to change notification settings

BastienDussap/qunfold

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI

qunfold | Quantification & Unfolding

This Python package implements our unified framework of algorithms for quantification and unfolding. It is designed for enabling the composition of novel methods from existing and easily customized loss functions and data representations. Moreover, this package leverages a powerful optimization back-end to yield state-of-the-art performances for all compositions.

Installation

pip install 'qunfold @ git+https://github.com/mirkobunse/qunfold'

Moreover, you will need a JAX backend. Typically, the CPU backend will be ideal:

pip install "jax[cpu]"

Quick start

For detailed information, visit the documentation.

Basically, you use this package as follows:

from qunfold import ACC # Adjusted Classify and Count
from sklearn.ensemble import RandomForestClassifier

acc = ACC( # use OOB predictions for training the quantifier
    RandomForestClassifier(oob_score=True)
)
acc.fit(X_trn, y_trn) # fit to training data
p_hat = acc.predict(X_tst) # estimate a prevalence vector

About

A unified implementation of quantification and unfolding algorithms

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 95.0%
  • Shell 2.5%
  • Makefile 2.1%
  • Dockerfile 0.4%