pysal.viz.mapclassify.Maximum_Breaks

class pysal.viz.mapclassify.Maximum_Breaks(y, k=5, mindiff=0)[source]

Maximum Breaks Map Classification

Parameters:
y : array

(n, 1), values to classify

k : int

number of classes required

mindiff : float

The minimum difference between class breaks

Examples

>>> import pysal.viz.mapclassify as mc
>>> cal = mc.load_example()
>>> mb = mc.Maximum_Breaks(cal, k = 5)
>>> mb.k
5
>>> mb.bins
array([ 146.005,  228.49 ,  546.675, 2417.15 , 4111.45 ])
>>> mb.counts
array([50,  2,  4,  1,  1])
Attributes:
yb : array

(n, 1), bin ids for observations

bins : array

(k, 1), the upper bounds of each class

k : int

the number of classes

counts : array

(k, 1), 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, k=5, mindiff=0)[source]

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

Methods

__init__(y[, k, mindiff]) 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.