0

Problem

Compute a list of vectors $$\mathcal{X} =\left\{ \pmb{x}_0, \dots, \pmb{x}_N \right\}$$ in squence of similarity (e.g. cosine similarity or Euclidean distance), uniformly sampled within a sample space $\mathcal{S}^6$, centered about the nominal vector $$\pmb{x}_0 = [x, y, z, v_x, v_y, v_z, m ]^\intercal$$ and parametrised by a boundary surface at which a certain percent similarity tolerance to the nominal vector is met.

Elaboration

  • I have a nominal vector $\pmb{x}_0 = [x, y, z, v_x, v_y, v_z, m ]^\intercal \in \mathcal{R}^6$.
  • I must consider a sample space $\mathcal{S}^6 \subset \mathcal{R}^6$, in which all points $\pmb{x}$ are within a certain similarity to the nominal vector $\pmb{x}_0$, e.g. $sim\left(\pmb{x}_n, \pmb{x}_0\right) \ge \epsilon \forall n$.
  • I need to generate a list of points sampled from $\mathcal{S}^6$ and ordered in sequence of similarity.

Tack så mycket!

cisprague
  • 159

1 Answers1

0

If your similarity metric is the euclidean distance, you want to uniformly sample over a sphere in $\mathbb{R}^6$, the sphere centered on $\mathbf{x}_0$ with radius $\epsilon$.

A simple way of doing this is to generate 6 random numbers $v_i$ uniformly in $[-\epsilon,\epsilon]$, accept them if $\sum v_i^2\leq \epsilon^2$, and construct your sample $\mathbf{x}_0+[v_1,v_2,\cdots,v_6]$

A cleverer way of uniformly sampling the sphere is given in this answer.

Once you have your desired number of vectors, just sort them.

Wouter
  • 7,673