my fork of prototorch_models
Go to file
danielstaps 0a2da9ae50
Added Vis for GMLVQ with more then 2 dims using PCA (#11)
* Added Vis for GMLVQ with more then 2 dims using PCA

* Added initialization possibility to GMlVQ with PCA and one example with omega init + PCA vis of 3 dims

* test(githooks): Add githooks for automatic commit checks

Co-authored-by: staps@hs-mittweida.de <staps@hs-mittweida.de>
Co-authored-by: Alexander Engelsberger <alexanderengelsberger@gmail.com>
2021-06-18 13:28:11 +02:00
docs test(githooks): Add githooks for automatic commit checks 2021-06-16 16:16:34 +02:00
examples Added Vis for GMLVQ with more then 2 dims using PCA (#11) 2021-06-18 13:28:11 +02:00
prototorch/models Added Vis for GMLVQ with more then 2 dims using PCA (#11) 2021-06-18 13:28:11 +02:00
tests Dummy test gets detected again 2021-05-25 22:03:38 +02:00
.bumpversion.cfg test(githooks): Add githooks for automatic commit checks 2021-06-16 16:16:34 +02:00
.codacy.yml Add CI definitions 2021-05-10 15:34:43 +02:00
.codecov.yml Add CI definitions 2021-05-10 15:34:43 +02:00
.gitignore test(githooks): Add githooks for automatic commit checks 2021-06-16 16:16:34 +02:00
.pre-commit-config.yaml test(githooks): Add githooks for automatic commit checks 2021-06-16 16:16:34 +02:00
.readthedocs.yml [DOC] Ignore Sphinx warnings until prototorch is bumped 2021-05-18 20:08:14 +02:00
.remarkrc Add remarkrc 2021-06-07 15:18:26 +02:00
.travis.yml Improve example test script (with failing example) 2021-05-21 18:48:37 +02:00
LICENSE Initial commit 2021-04-21 13:13:28 +02:00
README.md test(githooks): Add githooks for automatic commit checks 2021-06-16 16:16:34 +02:00
setup.py test(githooks): Add githooks for automatic commit checks 2021-06-16 16:16:34 +02:00

ProtoTorch Models

Build Status PyPI

Pre-packaged prototype-based machine learning models using ProtoTorch and PyTorch-Lightning.

Installation

To install this plugin, simply run the following command:

pip install prototorch_models

Installing the models plugin should automatically install a suitable version of ProtoTorch. The plugin should then be available for use in your Python environment as prototorch.models.

Contribution

This repository contains definition for git hooks. Pre-commit gets installed as development dependency with prototorch. Please install the hooks by running

pre-commit install
pre-commit install --hook-type commit-msg

before creating the first commit.

Available models

LVQ Family

  • Learning Vector Quantization 1 (LVQ1)
  • Generalized Learning Vector Quantization (GLVQ)
  • Generalized Relevance Learning Vector Quantization (GRLVQ)
  • Generalized Matrix Learning Vector Quantization (GMLVQ)
  • Limited-Rank Matrix Learning Vector Quantization (LiRaMLVQ)
  • Localized and Generalized Matrix Learning Vector Quantization (LGMLVQ)
  • Learning Vector Quantization Multi-Layer Network (LVQMLN)
  • Siamese GLVQ
  • Cross-Entropy Learning Vector Quantization (CELVQ)
  • Soft Learning Vector Quantization (SLVQ)
  • Robust Soft Learning Vector Quantization (RSLVQ)
  • Probabilistic Learning Vector Quantization (PLVQ)

Other

  • k-Nearest Neighbors (KNN)
  • Neural Gas (NG)
  • Growing Neural Gas (GNG)

Work in Progress

  • Classification-By-Components Network (CBC)
  • Learning Vector Quantization 2.1 (LVQ2.1)
  • Self-Organizing-Map (SOM)

Planned models

  • Median-LVQ
  • Generalized Tangent Learning Vector Quantization (GTLVQ)
  • Self-Incremental Learning Vector Quantization (SILVQ)

Development setup

It is recommended that you use a virtual environment for development. If you do not use conda, the easiest way to work with virtual environments is by using virtualenvwrapper. Once you've installed it with pip install virtualenvwrapper, you can do the following:

export WORKON_HOME=~/pyenvs
mkdir -p $WORKON_HOME
source /usr/local/bin/virtualenvwrapper.sh  # location may vary
mkvirtualenv pt

Once you have a virtual environment setup, you can start install the models plugin with:

workon pt
git clone git@github.com:si-cim/prototorch_models.git
cd prototorch_models
git checkout dev
pip install -e .[all]  # \[all\] if you are using zsh or MacOS

To assist in the development process, you may also find it useful to install yapf, isort and autoflake. You can install them easily with pip. Also, please avoid installing Tensorflow in this environment. It is known to cause problems with PyTorch-Lightning.

FAQ

How do I update the plugin?

If you have already cloned and installed prototorch and the prototorch_models plugin with the -e flag via pip, all you have to do is navigate to those folders from your terminal and do git pull to update.