# mapclassify.KClassifiers

class mapclassify.KClassifiers(y, pct=0.8)

  Evaluate all \(k\)-classifers and pick optimal based on \(k\) and GADF.

  Parameters:
    y `numpy.array`

      \((n,1)\), values to be classified.

    pct `float` (`default` 0.8)

      The percentage of GADF to exceed.

  Attributes:
    best `MapClassifier`

      Instance of the optimal `MapClassifier`.

    results `dict`

      Keys are classifier names, values are the `MapClassifier` instances with the best `pct` for each classifier.

  See also

  `gadf`

  Notes

  This can be used to suggest a classification scheme.

  Examples

      >>> import mapclassify
      >>> cal = mapclassify.load_example()
      >>> ks = mapclassify.classifiers.KClassifiers(cal)
      >>> ks.best.name
      'FisherJenks'

      >>> ks.best.k
      4

      >>> float(ks.best.gadf)
      0.8481032719908105

  __init__(y, pct=0.8)

  Methods

  `__init__`(y[, pct]) |