trustworthiness#
- cuml.metrics.trustworthiness(X, X_embedded, n_neighbors=5, metric='euclidean', convert_dtype=True, batch_size=512) float[source]#
Expresses to what extent the local structure is retained in embedding. The score is defined in the range [0, 1].
- Parameters:
- Xarray-like (device or host) shape = (n_samples, n_features)
Acceptable formats: cuDF DataFrame, NumPy ndarray, Numba device ndarray, cuda array interface compliant array like CuPy
- X_embeddedarray-like (device or host) shape= (n_samples, n_features)
Acceptable formats: cuDF DataFrame, NumPy ndarray, Numba device ndarray, cuda array interface compliant array like CuPy
- n_neighborsint, optional (default=5)
Number of neighbors considered
- metricstr in [‘euclidean’] (default=’euclidean’)
Metric used to compute the trustworthiness. For the moment only ‘euclidean’ is supported.
- convert_dtypebool, optional (default=False)
When set to True, the trustworthiness method will automatically convert the inputs to np.float32.
- batch_sizeint (default=512)
The number of samples to use for each batch.
- Returns:
- trustworthiness scoredouble
Trustworthiness of the low-dimensional embedding