Skip to content

Angie-Liu/labelshift

Repository files navigation

Label Shift

This tutorial walks you through the implementation of Regularized Learning under Label Shifts (RLLS) an algorithm for domain adaptation in the presence of label shift.

The model constructed in this tutorial follows the work described in Regularized Learning for Domain Adaptation under Label Shifts. This work proposes RLLS, a novel algorithm for domain adaptation in the presence of a shift in the label distribution. This work is among those few works which theoretically analyze this problem and provides a good generalization guarantee for the RLLS without prior knowledge, required by earlier works. The RLLS is designed in the insight of the theoretical development in this paper.

  • Requirements: cvxpy, gurobi

  • Instruction:

    Code-base for training: offline_label_shift.py online_label_shift

    Creat artificial shifts: mnist_for_labelshift.py cifar10_for_labelshift.py --for generating shifts in data

    Code-base for testing: label_shift.py, w_comp.py --

About

Regularized Learning under label shifts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages