pub fn trustworthiness<S1, S2>(
x: &ArrayBase<S1, Ix2>,
x_embedded: &ArrayBase<S2, Ix2>,
n_neighbors: usize,
metric: &str,
) -> Result<f64>
Expand description
Calculate trustworthiness score for a dimensionality reduction
Trustworthiness measures to what extent the local structure is retained when projecting data from the original space to the embedding space.
§Arguments
x
- Original data, shape (n_samples, n_features)x_embedded
- Embedded data, shape (n_samples, n_components)n_neighbors
- Number of neighbors to considermetric
- Metric to use (currently only ‘euclidean’ is implemented)
§Returns
Result<f64>
- Trustworthiness score between 0.0 and 1.0