class_docstr: Simple encoder that assigns a unique integer to every observed label.
  
  Allocates an `unknown` label by default to index 0.
  
  Labels must be exact matches between inference and training (e.g. no .lower() on strings is performed here).
class_docstr_tok: ["Simple","encoder","that","assigns","a","unique","integer","to","every","observed","label",".","Allocates","an","`","unknown","`","label","by","default","to","index","0",".","Labels","must","be","exact","matches","between","inference","and","training","(","e.g",".","no",".lower","(",")","on","strings","is","performed","here",")","."]
code: def __init__(self, is_target=False, normalize=True) -> None:
      super().__init__(is_target)
      self.label_map = defaultdict(int)  # UNK category maps to 0
      self.inv_label_map = (
          {}
      )  # invalid encoded values are mapped to None in `decode`
      self.output_size = 1
      self.n_labels = None
      self.normalize = normalize
  
file_path: lightwood/lightwood/encoder/categorical/simple_label.py
imports: from typing import List, Union
  from collections import defaultdict
  import pandas
  import numpy
  import torch
  from lightwood.encoder.base import BaseEncoder
  from lightwood.helpers.constants import _UNCOMMON_WORD
label_desc: Use image node_id 1 to create a new SimpleLabelEncoder object from inherited base classes: BaseEncoder with example: obj = SimpleLabelEncoder(is_target, normalize)