How to use the susi.SOMEstimator.SOMEstimator function in susi

To help you get started, we’ve selected a few susi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github felixriese / susi / susi / SOMClassifier.py View on Github external
Copyright (c) 2019-2020, Felix M. Riese.
All rights reserved.

"""

import numpy as np
from scipy.special import softmax
from sklearn.base import ClassifierMixin
from sklearn.preprocessing import LabelBinarizer
from sklearn.utils import class_weight

from .SOMEstimator import SOMEstimator
from .SOMUtils import check_estimation_input


class SOMClassifier(SOMEstimator, ClassifierMixin):
    """Supervised SOM for estimating discrete variables (= classification).

    Parameters
    ----------
    n_rows : int, optional (default=10)
        Number of rows for the SOM grid

    n_columns : int, optional (default=10)
        Number of columns for the SOM grid

    init_mode_unsupervised : str, optional (default="random")
        Initialization mode of the unsupervised SOM

    init_mode_supervised : str, optional (default="majority")
        Initialization mode of the classification SOM
github felixriese / susi / susi / SOMRegressor.py View on Github external
"""SOMRegressor class.

Copyright (c) 2019-2020, Felix M. Riese.
All rights reserved.

"""

import numpy as np
from sklearn.base import RegressorMixin

from .SOMEstimator import SOMEstimator


class SOMRegressor(SOMEstimator, RegressorMixin):
    """Supervised SOM for estimating continuous variables (= regression).

    Parameters
    ----------
    n_rows : int, optional (default=10)
        Number of rows for the SOM grid

    n_columns : int, optional (default=10)
        Number of columns for the SOM grid

    init_mode_unsupervised : str, optional (default="random")
        Initialization mode of the unsupervised SOM

    init_mode_supervised : str, optional (default="random")
        Initialization mode of the supervised SOM