Giter VIP home page Giter VIP logo

f1's Introduction

Gradient-based learning for the $F$-measure and other performance metrics

System requirements

We only tested our implementation on Ubuntu 16.04 and Python 3.6.5. Please follow website instructions to install pytorch 1.0.0 and torchvision 0.2.1 (GPU recommended). Please install the following packages via pip:

pip install -U tensorflow
pip install tensorboardX
pip install -U protobuf

Datasets

Please download the Adult, CIFAR10, CIFAR100, Covertype, KDDCup08, Letter and MNIST dataset:

bash data.sh

Experiments

Binary and multi-class classification experiments are implemented respectively in binary.py and multi.py. To reproduce results in our paper:

Binary classification, F1 score, and linear classifier

bash binary.sh f1 linear NUMBER-OF-PROCESSES
for x in f1-linear-*; do bash select.sh $x f1; done

Binary classification, F1 score, and multi-layer perceptron

bash binary.sh f1 mlp NUMBER-OF-PROCESSES
for x in f1-mlp-*; do bash select.sh $x f1; done

Multi-class classification, micro F1 score, and linear classifier

bash multi.sh f1_micro linear NUMBER-OF-PROCESSES
for x in f1_micro-linear-*; do bash select.sh $x f1; done

Multi-class classification, micro F1 score, and multi-layer perceptron

bash multi.sh f1_micro mlp NUMBER-OF-PROCESSES
for x in f1_micro-mlp-*; do bash select.sh $x f1; done

Binary classification, G-measure (a.k.a. Fowlkes–Mallows index), and linear classifier

bash binary.sh g1 linear NUMBER-OF-PROCESSES
for x in g1-linear-*; do bash select.sh $x g1; done

Binary classification, G-measure (a.k.a. Fowlkes–Mallows index), and multi-layer perceptron

bash binary.sh g1 mlp NUMBER-OF-PROCESSES
for x in g1-mlp-*; do bash select.sh $x g1; done

Multi-class classification, G-measure (a.k.a. Fowlkes–Mallows index), and linear classifier

bash multi.sh g1_micro linear NUMBER-OF-PROCESSES
for x in g1_micro-linear-*; do bash select.sh $x g1; done

Multi-class classification, G-measure (a.k.a. Fowlkes–Mallows index), and multi-layer perceptron

bash multi.sh g1_micro mlp NUMBER-OF-PROCESSES
for x in g1_micro-mlp-*; do bash select.sh $x g1; done

f1's People

Contributors

gaiyu0 avatar

Stargazers

 avatar

Watchers

 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.