# coding: utf-8

"""
    Mixpeek API

    This is the Mixpeek API, providing access to various endpoints for data processing and retrieval.

    The version of the OpenAPI document: 1.3.0
    Contact: info@mixpeek.com
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self


class ClusteringAlgorithm(str, Enum):
    """
    Supported clustering algorithms.  Two types of clustering are available: 1. Vector-based: Clusters documents by embedding similarity 2. Attribute-based: Clusters documents by metadata attributes  Vector-based algorithms (require feature_vector):     - kmeans: Partitions data into K clusters by minimizing within-cluster variance     - dbscan: Density-based clustering, finds clusters of arbitrary shape     - hdbscan: Hierarchical DBSCAN, auto-determines number of clusters     - agglomerative: Hierarchical clustering using linkage criteria     - spectral: Uses graph theory to find clusters     - gaussian_mixture: Probabilistic model assuming Gaussian distributions     - mean_shift: Finds clusters by locating density maxima     - optics: Ordering points to identify clustering structure  Attribute-based algorithm (requires attribute_config):     - attribute_based: Groups documents by metadata attributes (e.g., category, brand)
    """

    """
    allowed enum values
    """
    KMEANS = 'kmeans'
    DBSCAN = 'dbscan'
    HDBSCAN = 'hdbscan'
    AGGLOMERATIVE = 'agglomerative'
    SPECTRAL = 'spectral'
    GAUSSIAN_MIXTURE = 'gaussian_mixture'
    MEAN_SHIFT = 'mean_shift'
    OPTICS = 'optics'
    ATTRIBUTE_BASED = 'attribute_based'

    @classmethod
    def from_json(cls, json_str: str) -> Self:
        """Create an instance of ClusteringAlgorithm from a JSON string"""
        return cls(json.loads(json_str))


