approximate_predict¶
- fast_plscan.prediction.approximate_predict(clusterer, X)¶
Approximate labels and membership probabilities for unseen points.
This follows HDBSCAN*-style approximate prediction: each new point is connected to the fitted structure through its nearest mutual-reachability neighbor in the training set.
- Parameters:
- Return type:
tuple[ndarray[tuple[int],dtype[int_]],ndarray[tuple[int],dtype[single]]]- Returns:
labels – Predicted cluster labels for each new point. Points that cannot be linked to a selected cluster are labeled
-1.probabilities – Approximate membership probabilities in
[0, 1]for each new point.
- Raises:
NotFittedError – If
clustererhas not been fitted.ValueError – If
clustererwas fitted with precomputed input, or ifXhas an invalid number of features.