Coder Social home page Coder Social logo

pydml's Introduction

pyDML

Distance Metric Learning Algorithms for Python

What is Distance Metric Learning?

Many machine learning algorithms need a similarity measure to carry out their tasks. Usually, standard distances, like euclidean distance, are used to measure this similarity. Distance Metric Learning algorithms try to learn an optimal distance from the data.

How to learn a distance?

There are two main ways to learn a distance in Distance Metric Learning:

  • Learning a metric matrix M, that is, a positive semidefinite matrix. In this case, the distance is measured as

  • Learning a linear map L. This map is also represented by a matrix, not necessarily definite or squared. Here, the distance between two elements is the euclidean distance after applying the transformation.

Every linear map defines a single metric (M = L'L), and two linear maps that define the same metric only differ in an isometry. So both approaches are equivalent.

Some applications

Improve distance based classifiers

Improving 1-NN classification.

Dimensionality reduction

Learning a projection onto a plane for the digits dataset (dimension 64).

Documentation

See the available algorithms, the additional functionalities and the full documentation here.

Citation

If you find this package useful in your research, please consider citing the software:

@article{suarez2020pydml,
  title={pyDML: A Python Library for Distance Metric Learning},
  author={Su{\'a}rez, Juan Luis and Garc{\'i}a, Salvador and Herrera, Francisco},
  journal={Journal of Machine Learning Research},
  volume={21},
  number={96},
  pages={1--7},
  year={2020}
}

Stats

The distance metric learning algorithms in pyDML are being evaluated in several datasets. The results of these experiments are available in the pyDML-Stats repository.

Installation

  • PyPI latest version: pip install pyDML

  • From GitHub: clone or download this repository and run the command python setup.py install on the root directory.

Authors

pydml's People

Contributors

jlsuarezdiaz avatar

Watchers

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