estimateEmbeddingDim function

Estimate the embedding dimension