pysal.viz.mapclassify.Percentiles

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

百分位数地图分类

参数:
y : 数组

要分类的属性

pct : 数组

百分位数默认值=[1,10,50,90,99100]

实例

>>> 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
属性:
yb : 数组

观察箱ID(numpy数组n x 1)

bins : 数组

每个类的上界(numpy数组k x 1)

k : 利息

班级数量

counts : 利息

每个类中的观察数(numpy数组k x 1)

方法

__call__ \(*args,*kwargs) 这将允许像调用函数一样调用分类器。
find_bin [(x)] 根据当前仓位估计对输入或输入进行排序
get_adcm () 班级中位数(adcm)周围的绝对偏差。
get_gadf () 拟合绝对偏差的优度
get_tss () 类均值的平方和
make \(*args,*kwargs) 根据此函数指定的配置选项,配置并创建将使用数据并生成分类的分类器。
update \([Y,就地]) 添加数据或更改分类参数。
__init__(y, pct=[1, 10, 50, 90, 99, 100])[源代码]

初始化自身。请参阅帮助(键入(self))以获得准确的签名。

方法

__init__ \(Y[,PCT]) 初始化自身。
find_bin [(x)] 根据当前仓位估计对输入或输入进行排序
get_adcm () 班级中位数(adcm)周围的绝对偏差。
get_gadf () 拟合绝对偏差的优度
get_tss () 类均值的平方和
make \(*args,*kwargs) 根据此函数指定的配置选项,配置并创建将使用数据并生成分类的分类器。
update \([Y,就地]) 添加数据或更改分类参数。