docstr: Checks reconstruction accuracy above 60%, less strict than OHE, because it is over a larger number of categories (1000).
docstr_tok: ["Checks","reconstruction","accuracy","above","60","%",",","less","strict","than","OHE",",","because","it","is","over","a","larger","number","of","categories","(","1000",")","."]
code: def test_autoencoder_label(self):
      """
      Checks reconstruction accuracy above 60%, less strict than OHE, because it is over a larger number of categories (1000).
      """  # noqa
      log.setLevel(logging.DEBUG)
      torch.manual_seed(2)
  
      priming_data, test_data = self.create_test_data(
          nb_categories=1000, nb_int_categories=1000
      )
  
      enc = CategoricalAutoEncoder(stop_after=20)
  
      enc.prepare(pd.Series(priming_data), pd.Series(priming_data))
      encoded_data = enc.encode(test_data)
      decoded_data = enc.decode(encoded_data)
  
      encoder_accuracy = accuracy_score(
          list(map(str, test_data)), list(map(str, decoded_data))
      )
      print(
          f"Categorical encoder accuracy for: {encoder_accuracy} on testing dataset"
      )
      self.assertTrue(encoder_accuracy > 0.60)
  
file_path: lightwood/tests/unit_tests/encoder/categorical/test_autoencoder.py
imports: import unittest
  from lightwood.encoder.categorical import CategoricalAutoEncoder
  import string
  import random
  import logging
  import numpy
  import pandas
  from sklearn.metrics import accuracy_score
  import torch
  from lightwood.helpers.log import log
label_desc: Use image node_id 3 for calling the TestAutoencoder obj's underlying member method code with example usage: obj.test_autoencoder_label() without return types