pysal.viz.mapclassify.Jenks_Caspall_Forced

class pysal.viz.mapclassify.Jenks_Caspall_Forced(y, k=5)[source]

Jenks Caspall Map Classification with forced movements

Parameters:
y : array

(n,1), values to classify

k : int

number of classes required

Examples

>>> import pysal.viz.mapclassify as mc
>>> cal = mc.load_example()
>>> jcf = mc.Jenks_Caspall_Forced(cal, k = 5)
>>> jcf.k
5
>>> jcf.bins
array([[1.34000e+00],
       [5.90000e+00],
       [1.67000e+01],
       [5.06500e+01],
       [4.11145e+03]])
>>> jcf.counts
array([12, 12, 13,  9, 12])
>>> jcf4 = mc.Jenks_Caspall_Forced(cal, k = 4)
>>> jcf4.k
4
>>> jcf4.bins
array([[2.51000e+00],
       [8.70000e+00],
       [3.66800e+01],
       [4.11145e+03]])
>>> jcf4.counts
array([15, 14, 14, 15])
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, k=5)[source]

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

Methods

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