Git Product home page Git Product logo

missing-sources's Introduction

Learning with Perfect Bags

Requires Python 3.7+.

Installation

One of the dependencies is PyTorch. If your system is not compatible with the default torch installation (for example if you require a specific CUDA installation), then please install this from pytorch.org as required. If so, it's recommended that you do this first.

We have provided a setup.py file with the dependencies. To install this package, pip install -e /path/to/this/dir

Running Experiments

The compare.sh script runs all the variants of our method.

Adult Income

This dataset is included in the repository.

Subgroup bias

bash scripts/compare.sh data=adult/gender bias=adult/partial_outcome enc=adult adapt=adult/on_enc_with_bags clust=adult

For the "no-cluster" baseline, the bag size needs to be changed:

python run_ss.py adapt.balanced_context=false misc.log_method=no-cluster-fdm data=adult/gender bias=adult/partial_outcome enc=adult adapt=adult/on_enc_with_bags clust=adult adapt.bag_size=32 adapt.batch_size=16

Missing subgroup

bash scripts/compare.sh data=adult/gender bias=adult/missing_demo enc=adult adapt=adult/on_enc_with_bags clust=adult

For the "no-cluster" baseline, the bag size needs to be changed:

python run_ss.py adapt.balanced_context=false misc.log_method=no-cluster-fdm data=adult/gender bias=adult/missing_demo enc=adult adapt=adult/on_enc_with_bags clust=adult adapt.bag_size=32 adapt.batch_size=16

Colored MNIST

This dataset will be downloaded automatically.

2 digits

Subgroup bias

bash scripts/compare.sh +experiment=cmnist_subgroup_bias

Missing subgroup

bash scripts/compare.sh +experiment=cmnist_missing_subgroup

3 digits

bash scripts/compare.sh data=cmnist/3dig bias=cmnist/3dig/4miss enc=mnist adapt=cmnist/mostly_traditional clust=vague_spaceship_improved adapt.iters=20000 adapt.zs_dim=2

CelebA

The code will try to download this, but the download quota is often saturated, so it might not work immediately.

bash scripts/compare.sh +experiment=celeba_gender

missing-sources's People

Contributors

tmke8 avatar

Stargazers

Nikolaus Schlemm avatar

Watchers

Oliver Thomas avatar Ivor Simpson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.