mapclassify.KClassifiers¶
-
class
mapclassify.
KClassifiers
(y, pct=0.8)[source]¶ Evaluate all k-classifers and pick optimal based on k and GADF
- Parameters
- yarray
(n,1), values to be classified
- pctfloat
The percentage of GADF to exceed
See also
Notes
This can be used to suggest a classification scheme.
Examples
>>> import mapclassify as mc >>> cal = mc.load_example() >>> ks = mc.classifiers.KClassifiers(cal) >>> ks.best.name 'FisherJenks' >>> ks.best.k 4 >>> ks.best.gadf 0.8481032719908105
- Attributes
- bestobject
instance of the optimal MapClassifier
- resultsdictionary
keys are classifier names, values are the MapClassifier instances with the best pct for each classifer
Methods
__init__
(self, y[, pct])Initialize self.