# mapclassify.Pooled

class mapclassify.Pooled(Y, classifier='Quantiles', **kwargs)

  Applying global binning across columns.

  Parameters:
    Y `numpy.array`

      \((n, m)\), values to classify, with \(m>1\).

    classifier `str` (`default` ‘Quantiles’)

      Name of `mapclassify.classifier` to apply.

    **kwargs `dict`

      Additional keyword arguments for classifier.

  Attributes:
    global_classifier `mapclassify.classifiers.MapClassifier`

      Instance of the pooled classifier defined as the classifier applied to the union of the columns.

    col_classifier `list`

      Elements are `MapClassifier` instances with the pooled classifier applied to the associated column of `Y`.

  Examples

      >>> import mapclassify
      >>> import numpy
      >>> n = 20
      >>> data = numpy.array([numpy.arange(n)+i*n for i in range(1,4)]).T
      >>> res = mapclassify.Pooled(data)

      >>> res.col_classifiers[0].counts.tolist()
      [12, 8, 0, 0, 0]

      >>> res.col_classifiers[1].counts.tolist()
      [0, 4, 12, 4, 0]

      >>> res.col_classifiers[2].counts.tolist()
      [0, 0, 0, 8, 12]

      >>> res.global_classifier.counts.tolist()
      [12, 12, 12, 12, 12]

      >>> res.global_classifier.bins == res.col_classifiers[0].bins
      array([ True,  True,  True,  True,  True])

      >>> res.global_classifier.bins
      array([31.8, 43.6, 55.4, 67.2, 79. ])

  __init__(Y, classifier='Quantiles', **kwargs)

  Methods

  `__init__`(Y[, classifier]) |