@Beta @PublicAPI public final class SphereExclusion extends Object
Licensing: this class is part of the JKlustor suite; it can be used with valid
JKlustor
license.
Please note that this class is marked with @Beta annotation, so it can be subject of incompatible changes or removal in later releases.
Modifier and Type | Method and Description |
---|---|
static IDBasedSingleLevelClustering |
adaptiveSPHEX(int initialMinCC,
int maxCC,
DissimilarityInput di,
ProgressObserver po)
Sphere exclusion clustering with sphere radius inference.
|
static IDBasedSingleLevelClustering |
fixedSPHEX(double radius,
DissimilarityInput di,
ProgressObserver po)
Sphere exclusion clustering with defined sphere radius.
|
static Optional<int[]> |
sphexCentroids(double r,
int maxCC,
DissimilarityInput di,
ProgressObserver po)
Identify SphereExclusion clustering based centroids for a given set.
|
static IDBasedSingleLevelClustering |
sphexClassify(int[] centroids,
DissimilarityInput di,
ProgressObserver po)
Classify input items into clusters determined by nearest centroids.
|
public static IDBasedSingleLevelClustering fixedSPHEX(double radius, DissimilarityInput di, ProgressObserver po) throws CancellationException
The returned clustring will reflect the given sphere radius, regardless of the found cluster count. If finer control is required over maximal cluster count then do centroid identification and classification steps separately.
radius
- Sphere radiusdi
- input sourcepo
- progress observer to updateCancellationException
- if cancelled by the progress observerIllegalArgumentException
- on empty input or non positive radiusLicenseException
- when appropriate license is not availablepublic static IDBasedSingleLevelClustering adaptiveSPHEX(int initialMinCC, int maxCC, DissimilarityInput di, ProgressObserver po) throws CancellationException
The returned cluster count is expected between the minimum and maximum expected value. This is aimed to be reached through optimization of sphere exclusion radius value. If minimum cluster count is greater than the represented input count its value will be lowered. Please note that it can not be guaranteed that resulting cluster count will fall between the given (or updated) limits.
initialMinCC
- minimum expected cluster count inclusivemaxCC
- maximum expected cluster count inclusivedi
- input sourcepo
- progress observer to updateCancellationException
- if cancelled by the progress observerIllegalArgumentException
- on empty input, or when cluster counts are invalidLicenseException
- when appropriate license is not availablepublic static Optional<int[]> sphexCentroids(double r, int maxCC, DissimilarityInput di, ProgressObserver po) throws CancellationException
r
- Sphere radius to use.maxCC
- Maximal allowed cluster count. If the given parameters results in more identified centroids the
algorithm immediately terminates and returns with an Optional.absent()
value.di
- Input dissimilarity spacepo
- Associated progress observerCancellationException
- When termination is due to cancel request from the progress observerLicenseException
- when appropriate license is not availablepublic static IDBasedSingleLevelClustering sphexClassify(int[] centroids, DissimilarityInput di, ProgressObserver po) throws CancellationException
centroids
- Centroid indexesdi
- Input dissimilarity spacepo
- Associated progress observerCancellationException
- When termination is due to cancel request from the progress observer
* @throws chemaxon.license.LicenseException when appropriate license is not available