pysal.viz.mapclassify.Percentiles

class pysal.viz.mapclassify.Percentiles(y, pct=[1, 10, 50, 90, 99, 100])[source]

Percentiles Map Classification

Parameters:
y : array

attribute to classify

pct : array

percentiles default=[1,10,50,90,99,100]

Examples

>>> import pysal.viz.mapclassify as mc
>>> cal = mc.load_example()
>>> p = mc.Percentiles(cal)
>>> p.bins
array([1.357000e-01, 5.530000e-01, 9.365000e+00, 2.139140e+02,
       2.179948e+03, 4.111450e+03])
>>> p.counts
array([ 1,  5, 23, 23,  5,  1])
>>> p2 = mc.Percentiles(cal, pct = [50, 100])
>>> p2.bins
array([   9.365, 4111.45 ])
>>> p2.counts
array([29, 29])
>>> p2.k
2
Attributes:
yb : array

bin ids for observations (numpy array n x 1)

bins : array

the upper bounds of each class (numpy array k x 1)

k : int

the number of classes

counts : int

the number of observations falling in each class (numpy array k x 1)

Methods

__call__(*args, **kwargs) This will allow the classifier to be called like it’s a function.
find_bin(x) Sort input or inputs according to the current bin estimate
get_adcm() Absolute deviation around class median (ADCM).
get_gadf() Goodness of absolute deviation of fit
get_tss() Total sum of squares around class means
make(*args, **kwargs) Configure and create a classifier that will consume data and produce classifications, given the configuration options specified by this function.
update([y, inplace]) Add data or change classification parameters.
__init__(y, pct=[1, 10, 50, 90, 99, 100])[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(y[, pct]) Initialize self.
find_bin(x) Sort input or inputs according to the current bin estimate
get_adcm() Absolute deviation around class median (ADCM).
get_gadf() Goodness of absolute deviation of fit
get_tss() Total sum of squares around class means
make(*args, **kwargs) Configure and create a classifier that will consume data and produce classifications, given the configuration options specified by this function.
update([y, inplace]) Add data or change classification parameters.