class_docstr: A Pipeline expression computing a categorical output.
  
  Classifiers are most commonly useful for describing grouping keys for
  complex transformations on Factor outputs. For example, Factor.demean() and
  Factor.zscore() can be passed a Classifier in their ``groupby`` argument,
  indicating that means/standard deviations should be computed on assets for
  which the classifier produced the same label.
class_docstr_tok: ["A","Pipeline","expression","computing","a","categorical","output",".","Classifiers","are","most","commonly","useful","for","describing","grouping","keys","for","complex","transformations","on","Factor","outputs",".","For","example",",","Factor.demean","(",")","and","Factor.zscore","(",")","can","be","passed","a","Classifier","in","their","``","groupby","``","argument",",","indicating","that","means\/standard","deviations","should","be","computed","on","assets","for","which","the","classifier","produced","the","same","label","."]
docstr: Convert ``self`` into a new classifier by mapping a function over each
  element produced by ``self``.
  
  Parameters
  ----------
  relabeler : function[str -> str or None]
      A function to apply to each unique value produced by ``self``.
  
  Returns
  -------
  relabeled : Classifier
      A classifier produced by applying ``relabeler`` to each unique
      value produced by ``self``.
docstr_tok: ["Convert","``","self","``","into","a","new","classifier","by","mapping","a","function","over","each","element","produced","by","``","self","``",".","Parameters","--","--","--","--","--","relabeler",":","function","[","str","-",">","str","or","None","]","A","function","to","apply","to","each","unique","value","produced","by","``","self","``",".","Returns","--","--","--","-","relabeled",":","Classifier","A","classifier","produced","by","applying","``","relabeler","``","to","each","unique","value","produced","by","``","self","``","."]
code: def relabel(self, relabeler):
      """
      Convert ``self`` into a new classifier by mapping a function over each
      element produced by ``self``.
  
      Parameters
      ----------
      relabeler : function[str -> str or None]
          A function to apply to each unique value produced by ``self``.
  
      Returns
      -------
      relabeled : Classifier
          A classifier produced by applying ``relabeler`` to each unique
          value produced by ``self``.
      """
      return Relabel(term=self, relabeler=relabeler)
  
imports: from numbers import Number
  import operator
  import re
  from numpy import where, isnan, nan, zeros
  import pandas
  from catalyst.lib.labelarray import LabelArray
  from catalyst.lib.quantiles import quantiles
  from catalyst.pipeline.api_utils import restrict_to_dtype
  from catalyst.pipeline.sentinels import NotSpecified
  from catalyst.pipeline.term import ComputableTerm
  from catalyst.utils.compat import unicode
  from catalyst.utils.input_validation import expect_types, expect_dtypes
  from catalyst.utils.memoize import classlazyval
  from catalyst.utils.numpy_utils import categorical_dtype, int64_dtype, vectorized_is_element
  from ..filters import ArrayPredicate, NotNullFilter, NullFilter, NumExprFilter
  from ..mixins import AliasedMixin, CustomTermMixin, DownsampledMixin, LatestMixin, PositiveWindowLengthMixin, RestrictedDTypeMixin, SingleInputMixin, StandardOutputs
label_desc: Use image node_id 9 for calling the Classifier obj's underlying member method code with example usage: obj.relabel(relabeler) and returns: Relabel