class_docstr: Mapper for losses -> model type
class_docstr_tok: ["Mapper","for","losses","-",">","model","type"]
code: def __init__(self):
      loss_to_model_type = {}
      loss_to_model_type.update(
          {
              "mean_squared_error": ModelType.REGRESSION,
              "mean_absolute_error": ModelType.REGRESSION,
              "mse": ModelType.REGRESSION,
              "mae": ModelType.REGRESSION,
              "cosine_proximity": ModelType.REGRESSION,
              "mean_absolute_percentage_error": ModelType.REGRESSION,
              "mean_squared_logarithmic_error": ModelType.REGRESSION,
              "logcosh": ModelType.REGRESSION,
              "binary_crossentropy": ModelType.CLASSIFICATION,
              "categorical_crossentropy": ModelType.CLASSIFICATION,
              "sparse_categorical_crossentropy": ModelType.CLASSIFICATION,
          }
      )
      self.__mapping = loss_to_model_type
  
imports: import json
  from enum import Enum
  from typing import Union
  from pyspark.sql import Column
  import pyspark.sql.functions
label_desc: Use image node_id 1 to create a new LossModelTypeMapper object from inherited base classes: Singleton with example: obj = LossModelTypeMapper()