dreye.compute_mean_width#
- dreye.compute_mean_width(X, n=1000, vectorized=False, center=False, seed=None)[source]#
Compute mean width of a matrix X by projecting it onto random vectors.
- Parameters:
- Xnumpy.ndarray
An n x m matrix with n samples and m features.
- nint, optional
The number of random projections to calculate width, by default 1000.
- vectorizedbool, optional
If True, use vectorized operations for speed up, by default False.
- centerbool, optional
If True, center the data before computing, by default False.
- seedint, optional
The seed for the random number generator, by default None.
- Returns:
- float
The mean width of X.