Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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