# - Generated by tools/entrypoint_compiler.py: do not edit by hand
"""
SmoothedHingeLoss
"""

import numbers

from ..utils.entrypoints import Component
from ..utils.utils import try_set


def smoothed_hinge_loss(
        smoothing_const=1.0,
        **params):
    """
    **Description**
        Smoothed Hinge loss.

    :param smoothing_const: Smoothing constant (settings).
    """

    entrypoint_name = 'SmoothedHingeLoss'
    settings = {}

    if smoothing_const is not None:
        settings['SmoothingConst'] = try_set(
            obj=smoothing_const,
            none_acceptable=True,
            is_of_type=numbers.Real)

    component = Component(
        name=entrypoint_name,
        settings=settings,
        kind='ClassificationLossFunction')
    return component
