pysal.viz.mapclassify.Std_Mean

class pysal.viz.mapclassify.Std_Mean(y, multiples=[-2, -1, 1, 2])[source]

Standard Deviation and Mean Map Classification

Parameters:
y : array

(n,1), values to classify

multiples : array

the multiples of the standard deviation to add/subtract from the sample mean to define the bins, default=[-2,-1,1,2]

Examples

>>> import pysal.viz.mapclassify as mc
>>> cal = mc.load_example()
>>> st = mc.Std_Mean(cal)
>>> st.k
5
>>> st.bins
array([-967.36235382, -420.71712519,  672.57333208, 1219.21856072,
       4111.45      ])
>>> st.counts
array([ 0,  0, 56,  1,  1])
>>>
>>> st3 = mc.Std_Mean(cal, multiples = [-3, -1.5, 1.5, 3])
>>> st3.bins
array([-1514.00758246,  -694.03973951,   945.8959464 ,  1765.86378936,
        4111.45      ])
>>> st3.counts
array([ 0,  0, 57,  0,  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

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, multiples=[-2, -1, 1, 2])[source]

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

Methods

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