sandbox.stats.multicomp.set_partition()

statsmodels.sandbox.stats.multicomp.set_partition

statsmodels.sandbox.stats.multicomp.set_partition(ssli) [source]

extract a partition from a list of tuples

this should be correctly called select largest disjoint sets. Begun and Gabriel 1981 don’t seem to be bothered by sets of accepted hypothesis with joint elements, e.g. maximal_accepted_sets = { {1,2,3}, {2,3,4} }

This creates a set partition from a list of sets given as tuples. It tries to find the partition with the largest sets. That is, sets are included after being sorted by length.

If the list doesn’t include the singletons, then it will be only a partial partition. Missing items are singletons (I think).

Examples

>>> li
[(5, 6, 7, 8), (1, 2, 3), (4, 5), (0, 1)]
>>> set_partition(li)
([(5, 6, 7, 8), (1, 2, 3)], [0, 4])

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.sandbox.stats.multicomp.set_partition.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部