Giter Club home page Giter Club logo

felixriese / susi Goto Github PK

View Code? Open in Web Editor NEW
102.0 4.0 21.0 3.74 MB

SuSi: Python package for unsupervised, supervised and semi-supervised self-organizing maps (SOM)

Home Page: https://felixriese.github.io/susi

License: BSD 3-Clause "New" or "Revised" License

TeX 0.60% Python 98.19% JavaScript 1.21%
machine-learning data-science opensource self-organizing-map som python semi-supervised-learning supervised-learning unsupervised-learning pypi-package

susi's Introduction

PyPi - Code Version

PyPI - Python Version

Travis.CI Status

Documentation Status

Codecov

Codacy Badge

Conda-forge

SuSi logo

SuSi: Supervised Self-organizing maps in Python

Python package for unsupervised, supervised and semi-supervised self-organizing maps (SOM)

Description

We present the SuSi package for Python. It includes a fully functional SOM for unsupervised, supervised and semi-supervised tasks:

  • SOMClustering: Unsupervised SOM for clustering
  • SOMRegressor: (Semi-)Supervised Regression SOM
  • SOMClassifier: (Semi-)Supervised Classification SOM
License

3-Clause BSD license

Author

Felix M. Riese

Citation

see Citation and in the bibtex file

Documentation

Documentation

Installation

Installation guidelines

Paper

F. M. Riese, S. Keller and S. Hinz in Remote Sensing, 2020

Installation

Pip

pip3 install susi

PyPi Downloads

Conda

conda install -c conda-forge susi

More information can be found in the installation guidelines.

Conda-Forge Downloads

Examples

A collection of code examples can be found in the documentation. Code examples as Jupyter Notebooks can be found here:

FAQs

  • How should I set the initial hyperparameters of a SOM? For more details on the hyperparameters, see in documentation/hyperparameters.
  • How can I optimize the hyperparameters? The SuSi hyperparameters can be optimized, for example, with scikit-learn.model_selection.GridSearchCV, since the SuSi package is developed according to several scikit-learn guidelines.

Citation

The bibtex file including both references is available in bibliography.bib.

Paper:

F. M. Riese, S. Keller and S. Hinz, "Supervised and Semi-Supervised Self-Organizing Maps for Regression and Classification Focusing on Hyperspectral Data", Remote Sensing, vol. 12, no. 1, 2020. DOI:10.3390/rs12010007

@article{riese2020supervised,
    author = {Riese, Felix~M. and Keller, Sina and Hinz, Stefan},
    title = {{Supervised and Semi-Supervised Self-Organizing Maps for
              Regression and Classification Focusing on Hyperspectral Data}},
    journal = {Remote Sensing},
    year = {2020},
    volume = {12},
    number = {1},
    article-number = {7},
    URL = {https://www.mdpi.com/2072-4292/12/1/7},
    ISSN = {2072-4292},
    DOI = {10.3390/rs12010007}
}

Code:

Felix M. Riese, "SuSi: SUpervised Self-organIzing maps in Python", Zenodo, 2019. DOI:10.5281/zenodo.2609130

image

@misc{riese2019susicode,
    author = {Riese, Felix~M.},
    title = {{SuSi: Supervised Self-Organizing Maps in Python}},
    year = {2019},
    DOI = {10.5281/zenodo.2609130},
    publisher = {Zenodo},
    howpublished = {\href{https://doi.org/10.5281/zenodo.2609130}{doi.org/10.5281/zenodo.2609130}}
}

License

This project is published under the 3-Clause BSD license.

PyPI - License

susi's People

Contributors

felixriese avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

susi's Issues

Support for sparse matrix

Hi, thank you for the great package.
I just wanted to ask whether the support for sparse matrices is still on the roadmap?
Some comments in the code suggest that it was planned.

Quantization Error

Hello,

I think there might be an issue with the Quantization calculation in Susi. The error seems to be much large then when I attempt the calculation myself. I believe the line below is missing the axis being specified, (axis=1):

    quantization_errors = np.linalg.norm(
        np.subtract(weights_per_datapoint, X)
    ) 

Thanks,

SOMClassifier object has no attribute 'predict_proba'

If I need to plot AUC-ROC curve as in other ML techniques in SKLEARN, is there any function like predict_proba() ? or manually has to calculate? Because it returns 'SOMClassifier' object has no attribute 'predict_proba'... Is there any function for the same?

Multi-output regression for SOMRegressor?

Hi Felix,

I noticed that the fit function for SOMRegressor only allows y to be a matrix of shape = [n_samples, 1]. Is there any way to allow for multi-output regression using SOMRegressor?

Thank you!

Why we need to save SOMRegressor.p?

In this notebook, why we need to save som to SOMRegressor.p in the local disk when the som has been trained?
Does anybody can explain this ?
Thank you.

ValueError: Found array with dim 3. None expected <=2.

Been bashing my head against this one. I have a hyperspectral cube from drill core scanning:

box.shape
(3590, 30, 249)

som = Susi.SOMClustering()
test = som.fit(box)

ValueError: Found array with dim 3. None expected <= 2.

wrong optional type hint?

Here it says that y is Optional which makes sense since for an unsupervised SOM it isn't necessary, however the check_estimation_input function does not allow y to be None.
Am I missing something?

ImportError: cannot import name 'softmax'

ImportError Traceback (most recent call last) in () ----> 1 import susi ~\Anaconda3\lib\site-packages\susi_init_.py in () 6 import numpy as np 7 import scipy.spatial.distance as dist ----> 8 from scipy.special import softmax 9 from sklearn.base import BaseEstimator, RegressorMixin, ClassifierMixin 10 from sklearn.decomposition import PCA ImportError: cannot import name 'softmax'

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.