Code Monkey home page Code Monkey logo

deepnaryecoc's Introduction

Deep N-ary Error Correcting Output Codes

This is TensorFlow implementation for the paper "Deep N-ary Error Correcting Output Codes" (MobiMedia 2020): https://arxiv.org/pdf/2009.10465.pdf.

Prerequisites

  • python 3.x with tensorflow (1.8.0~1.13.1), keras, numpy, sklearn, scipy, matplotlib, tqdm.

Datasets

Text Datasets

  • TREC: Question-type classification dataset (6-classes), [link].
  • STS-5: Stanford Sentiment Treebank dataset (5-classes), [link].

Convert file format to UTF-8 on Mac OS X: iconv -f <other_format> -t utf-8 file > new_file
Convert file format to UTF-8 on Ubuntu Linux: iconv -f <other_format> -t utf-8 file -o new_file

Image Datasets

Quick Start

Take the MNIST dataset as an example. Training the model for MNIST dataset without sharing base learners' parameters:

python train_mnist.py --gpu_idx 0 \  # specify the gpu index
                      --training True \  # specify the mode (training or testing)
                      --num_meta_class 3 \  # specify the number of meta classes
                      --num_classifier 60  # specify the number of base learners

Training the model for MNIST dataset with full sharing base learners' encoder parameters (except for the classifier head):

python train_mnist_full.py --gpu_idx 0 \  # specify the gpu index
                           --training True \  # specify the mode (training or testing)
                           --num_meta_class 3 \  # specify the number of meta classes
                           --num_classifier 60  # specify the number of base learners

Citation

If you feel this project helpful to your research, please cite our work.

@article{zhang2020deep,
  title={Deep N-ary Error Correcting Output Codes},
  author={Zhang, Hao and Zhou, Joey Tianyi and Wang, Tianying and Tsang, Ivor W and Goh, Rick Siow Mong},
  journal={arXiv preprint arXiv:2009.10465},
  year={2020},
  url={https://arxiv.org/pdf/2009.10465.pdf}
}

and

@article{zhou2019n,
  title={N-ary decomposition for multi-class classification},
  author={Zhou, Joey Tianyi and Tsang, Ivor W and Ho, Shen-Shyang and M{\"u}ller, Klaus-Robert},
  journal={Machine Learning},
  volume={108},
  number={5},
  pages={809--830},
  year={2019},
  publisher={Springer}
}

deepnaryecoc's People

Contributors

26hzhang avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.