Skip to main content

Scikit-learn-style implementation of the close-k classifier.

Project description

Close-k Classifier

This repository contains code accompanying

Minimizing Close-k Aggregate Loss Improves Classification

Bryan He, James Zou.

We provide a Python 3 implementation using the scikit-learn API, and provide code to reproduce the figures and tables from the paper.

Installation

Our package is available on PyPy, and can be installed using

pip install -i https://pypi.org/project/ closek

You can also install this package by cloning the Github repository, and running

pip install closek

If you want directly use the implementation in your package, you can also copy closek/closek.py into your code.

Usage

An example of how to use our package is shown in test.py.

Generating Results from Paper

The code used for the paper is in experiments. See the README there for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

closek-1.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

closek-1.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file closek-1.1.tar.gz.

File metadata

  • Download URL: closek-1.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for closek-1.1.tar.gz
Algorithm Hash digest
SHA256 189e564af01c4025676e0192e26e080cd1b39b74c6a71ad62d9c02b67798bbf7
MD5 ea6c053a2deecadea55f927e74b8d123
BLAKE2b-256 4cf54aba3e2889057bea529344a4ad040050c86942f6af2f15e106dedd6e0d54

See more details on using hashes here.

File details

Details for the file closek-1.1-py3-none-any.whl.

File metadata

  • Download URL: closek-1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for closek-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a63a05cc37b0e68df25fed129f0de7b95c1e1f31f879b022cb64242403eceab5
MD5 c2ca88b38e4da86c8f5f3f8a05859cb9
BLAKE2b-256 84164ad8019d008e790ef543ace24dde9b773efa36908dbd4f379e0644b31618

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page