docstr: Load the classifier pickle if not cached
  
  returns classifier, bin_labels, name and features
docstr_tok: ["Load","the","classifier","pickle","if","not","cached","returns","classifier",",","bin_labels",",","name","and","features"]
code: def load_classifier(self):
      """Load the classifier pickle if not cached
  
      returns classifier, bin_labels, name and features
      """
      d = self.get_dictionary()
      file_ = self.model_file_name.value
      directory_ = self.model_directory.get_absolute_path()
      path_ = os.path.join(directory_, file_)
      if path_ not in d:
          if not os.path.isfile(path_):
              raise ValidationError(
                  "No such classifier file: %s" % path_,
                  self.model_file_name,
              )
          else:
              if not file_.endswith(".txt"):
                  # Probably a model file
                  import joblib
  
                  d[path_] = joblib.load(path_)
                  if len(d[path_]) < 3:
                      raise IOError(
                          "The selected model file doesn't look like a CellProfiler Analyst classifier."
                          "See the help dialog for more info on model formats."
                      )
                  if d[path_][2] == "FastGentleBoosting":
                      # FGB model files are not sklearn-based, we'll load it as rules instead.
                      rules = Rules(allow_fuzzy=self.allow_fuzzy)
                      rules.load(d[path_][0])
                      d[path_] = (
                          rules,
                          d[path_][1],
                          "Rules",
                          [
                              f"{rule.object_name}_{rule.feature}"
                              for rule in rules.rules
                          ],
                      )
              else:
                  # Probably a rules list
                  rules = Rules(allow_fuzzy=self.allow_fuzzy)
                  rules.parse(path_)
                  # Construct a classifier-like object
                  d[path_] = (
                      rules,
                      rules.get_classes(),
                      "Rules",
                      [
                          f"{rule.object_name}_{rule.feature}"
                          for rule in rules.rules
                      ],
                  )
      return d[path_]
  
imports: import functools
  import os
  import numpy
  from cellprofiler.modules import _help
  from cellprofiler.utilities.rules import Rules
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT, M_LOCATION_CENTER_X, M_LOCATION_CENTER_Y, COLTYPE_VARCHAR, C_COUNT, C_CHILDREN, C_LOCATION, C_NUMBER, C_PARENT, FTR_OBJECT_NUMBER, FTR_CENTER_X, FTR_CENTER_Y, FTR_CENTER_Z
  from cellprofiler_core.constants.measurement import COLTYPE_INTEGER
  from cellprofiler_core.constants.measurement import IMAGE
  from cellprofiler_core.image import Image
  from cellprofiler_core.module import Module
  from cellprofiler_core.object import Objects
  from cellprofiler_core.preferences import get_default_colormap, get_headless
  from cellprofiler_core.setting import Binary
  from cellprofiler_core.setting import Divider
  from cellprofiler_core.setting import HiddenCount
  from cellprofiler_core.setting import Measurement
  from cellprofiler_core.setting import SettingsGroup
  from cellprofiler_core.setting import ValidationError
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.do_something import DoSomething
  from cellprofiler_core.setting.do_something import RemoveSettingButton
  from cellprofiler_core.setting.subscriber import LabelSubscriber
  from cellprofiler_core.setting.text import Alphanumeric, Directory, Filename, LabelName
  from cellprofiler_core.setting.text import Float
  from cellprofiler_core.setting.text import ImageName
  from cellprofiler_core.setting.text import Integer
  from cellprofiler_core.setting.text import Text
  from cellprofiler_core.constants.measurement import FF_CHILDREN_COUNT
  from cellprofiler_core.constants.measurement import FF_COUNT
  from cellprofiler_core.constants.measurement import FF_PARENT
  from cellprofiler_core.module.image_segmentation import ImageSegmentation
label_desc: Use image node_id 19 for calling the ClassifyObjects obj's underlying member method code with example usage: obj.load_classifier() and returns: d