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: Called with the result of a pipeline. This needs to return an object
  which can be put into the workspace to continue doing computations.
  
  This is the inverse of
  :func:`~catalyst.pipeline.term.Term.postprocess`.
docstr_tok: ["Called","with","the","result","of","a","pipeline",".","This","needs","to","return","an","object","which","can","be","put","into","the","workspace","to","continue","doing","computations",".","This","is","the","inverse","of",":","func",":","`","~catalyst.pipeline.term.Term.postprocess","`","."]
code: def to_workspace_value(self, result, assets):
      """
      Called with the result of a pipeline. This needs to return an object
      which can be put into the workspace to continue doing computations.
  
      This is the inverse of
      :func:`~catalyst.pipeline.term.Term.postprocess`.
      """
      if self.dtype == int64_dtype:
          return super(Classifier, self).to_workspace_value(
              result, assets
          )
  
      assert isinstance(
          result.values, pd.Categorical
      ), "Expected a Categorical, got %r." % type(result.values)
      with_missing = pd.Series(
          data=pd.Categorical(
              result.values,
              result.values.categories.union([self.missing_value]),
          ),
          index=result.index,
      )
      return LabelArray(
          super(Classifier, self).to_workspace_value(
              with_missing,
              assets,
          ),
          self.missing_value,
      )
  
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 12 for calling the Classifier obj's underlying member method code with example usage: obj.to_workspace_value(result, assets) and returns: LabelArray, super