Skip to content

splito.utils

splito.utils

EmpiricalKernelMapTransformer

Transforms a dataset using the Empirical Kernel Map method. In this, a point is defined by its distance to a set of reference points. After this transformation, one can use the euclidean metric even if the original space was not euclidean compatible.

__call__
__call__(X)

Transforms a list of datapoints

transform
transform(X)

Transforms a single datapoint

get_iqr_outlier_bounds

get_iqr_outlier_bounds(X, factor: float = 1.5)

Return the bounds for outliers using the Inter-Quartile Range (IQR) method. Returns a lower and upper bound. Any value exceeding these bounds is considered an outlier.

get_kmeans_clusters

get_kmeans_clusters(
    X,
    n_clusters: int,
    random_state: Optional[int] = None,
    return_centers: bool = False,
    base_metric: str = "euclidean",
)

Get the k-means clusters for a set of datapoints

If the base metric is not euclidean, we use the Empirical Kernel Map to transform the data into a euclidean compatible space.