Giter VIP home page Giter VIP logo

active-assess's Introduction

Active Bayesian Assessment for Black-Box Classifiers

Getting started

To setup virtual environment install dependencies in requirements.txt:

conda create -n active-assessment python=3.7
source activate active-assessment
pip install -r requirements.txt

Data


Datasets are uploaded as Appendices. See the main paper and the technical appendices for detailed description of the datasets and the prediction models. Download the datasets and update DATA_DIR, RESULTS_DIR and FIGURE_DIR and src/data_utils.py accordingly.

Run the active Bayesian assessor


Our implementation supports different methods we reported in the paper, including UPrior, IPrior, UPrior+TS, IPrior+TS for different assessment tasks:

  • assess_accuracy.py: train the assessment models for accuracy-related tasks;
  • assess_confusion.py: train the assessment models for confusion matrix-related tasks;
  • assess_difference.py: train the assessment models for performance comparison.

For example, to estimate the groupwise_accuracy of cifar-100 with prior strength $$\alpha_k + \beta_k=2$$, navigate to src directory and run:

python assess_accuracy.py --dataset_name cifar100 \
                          --group_method predicted_class \
                          --metric groupwise_accuracy \
                          --pseudocount 2 \
                          --topk 1

Eval the assessment methods

We provide the scripts to evaluate the performance of difference methods in terms of different tasks, including:

  • eval_accuracy.py: this script is for evaluating (1) estimating of groupwise accuracies and (2) identification of extreme classes;
  • eval_confusion.py: this script is for evaluating estimating of confusion matrices;
  • eval_difference.py: this script is for evaluating comparison of groupwise accuracies. For example, to assess the performance of different assessment models for estimating the confusion matrices:
declare -a DatasetNames=("cifar100" "dbpedia" "20newsgroup" "svhn")
for dataset_name in "${DatasetNames[@]}"
do
    python eval_confusion.py --dataset_name $dataset_name &
done

To reproduce the results reported in the paper and supplements:

  • cd src
  • bash script

active-assess's People

Contributors

jidisi avatar disiji avatar

Stargazers

 avatar

Watchers

James Cloos avatar  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.