facet.data.partition.Partitioner#

class facet.data.partition.Partitioner(max_partitions=None)[source]#

Abstract base class of all partitioners.

Bases

FittableMixin [ndarray [Any, dtype [~T_Values]]]

Generic types

~T_Values(bound= generic)

Metaclasses

ABCMeta

Parameters

max_partitions (Optional[int]) – the maximum number of partitions to generate; must be at least 2 (default: 20)

Method summary

fit

Calculate the partitioning for the given observed values.

Attribute summary

DEFAULT_MAX_PARTITIONS

frequencies_

The count of values allocated to each partition.

is_categorical

True if this is partitioner handles categorical values, False otherwise.

is_fitted

See pytools.fit.FittableMixin.is_fitted

max_partitions

The maximum number of partitions to be generated by this partitioner.

partitions_

The values representing the partitions.

Definitions

abstract fit(values, **fit_params)[source]#

Calculate the partitioning for the given observed values.

Parameters
  • values (ndarray[Any, dtype[TypeVar(T_Values, bound= generic)]]) – a sequence of observed values as the empirical basis for calculating the partitions

  • fit_params (Any) – optional fitting parameters

Return type

Partitioner

Returns

self

property frequencies_: numpy.ndarray[Any, numpy.dtype[numpy.int64]]#

The count of values allocated to each partition.

Return type

ndarray[Any, dtype[int64]]

abstract property is_categorical: bool#

True if this is partitioner handles categorical values, False otherwise.

Return type

bool

abstract property is_fitted: bool#

See pytools.fit.FittableMixin.is_fitted

property max_partitions: int#

The maximum number of partitions to be generated by this partitioner.

Return type

int

property partitions_: Sequence[T_Values]#

The values representing the partitions.

Return type

Sequence[TypeVar(T_Values, bound= generic)]