How to use the susi.SOMClustering.SOMClustering 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 / SOMEstimator.py View on Github external
All rights reserved.

"""

from abc import ABC, abstractmethod

import numpy as np
from sklearn.base import BaseEstimator
from sklearn.utils.validation import check_array, check_is_fitted
from tqdm import tqdm

from .SOMClustering import SOMClustering
from .SOMUtils import check_estimation_input, modify_weight_matrix_online


class SOMEstimator(SOMClustering, BaseEstimator, ABC):
    """Basic class for supervised self-organizing maps.

    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