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: Construct a Filter returning True for asset/date pairs where the output
  of ``self`` matches ``other``.
docstr_tok: ["Construct","a","Filter","returning","True","for","asset\/date","pairs","where","the","output","of","``","self","``","matches","``","other","``","."]
code: def eq(self, other):
      """
      Construct a Filter returning True for asset/date pairs where the output
      of ``self`` matches ``other``.
      """
      # We treat this as an error because missing_values have NaN semantics,
      # which means this would return an array of all False, which is almost
      # certainly not what the user wants.
      if other == self.missing_value:
          raise ValueError(
              "Comparison against self.missing_value ({value!r}) in"
              " {typename}.eq().\n"
              "Missing values have NaN semantics, so the "
              "requested comparison would always produce False.\n"
              "Use the isnull() method to check for missing values.".format(
                  value=other,
                  typename=(type(self).__name__),
              )
          )
  
      if isinstance(other, Number) != (self.dtype == int64_dtype):
          raise InvalidClassifierComparison(self, other)
  
      if isinstance(other, Number):
          return NumExprFilter.create(
              "x_0 == {other}".format(other=int(other)),
              binds=(self,),
          )
      else:
          return ArrayPredicate(
              term=self,
              op=operator.eq,
              opargs=(other,),
          )
  
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 3 for calling the Classifier obj's underlying member method code with example usage: obj.eq(other) and returns: NumExprFilter, ArrayPredicate