src.model.layers.tf_cure.cure module

cure module

Module built to comptue the CURE clustering algorithm on top of tensorflow vector, taking advantage of GPU acceleration when possible.

class src.model.layers.tf_cure.cure.TfCURE(data: Tensor, n_clusters: int = 2, n_rep: int = 5, compression_factor: float = 0.5)

Bases: object

TfCURE.

This class is the entry point to execute the CURE algorithm using tensorflow

property clusters: Tensor | None

clusters.

Returns current avilable clusters

Returns:

The clusters

Return type:

tf.Tensor

property compression_factor: float

compression_factor.

Returns the compression factor to apply for representatives

Returns:

The compression factor to apply for representatives

Return type:

float

property data: Tensor

data.

Returns the data tensor

Returns:

The data tensor

Return type:

tf.Tensor

property dimension: int

dimension.

Returns the number of dimensions for the points in the data tensor

Returns:

The number of dimensions

Return type:

int

init_queue() None
init_rtree(**kwargs) None
iterate() None

iterate.

property n_clusters: int

n_clusters.

Returns the number of clusters to obtain

Returns:

The number of clusters to obtain

Return type:

int

property n_rep: int

n_rep.

Returns the number of representatives to use

Returns:

The number of representatives to use

Return type:

int

process() None
property tree: tf_rtree | None

tree.

Returns the rtree object

Returns:

The rtree object

Return type:

tf_rtree