mardi 28 janvier 2020

Generate random points on 10-dimensional unit sphere

I need to generate a vector sampled uniformly with 10 directions (a collection of 10 random numbers) which lies over a unit sphere. So, the sum of the squares of the 10 values should be 1.

This is the exact question for which I need to generate those points:

Implement the Perceptron algorithm and run it on the following synthetic data sets in ℝ10: pick 𝑤∗ = [1,0,0,…,0]; generate 1000 points 𝑥 by sampling uniformly at random over the unit sphere and then removing those that have margin 𝛾 smaller than 0.1; generate label 𝑦 = sign((𝑤∗)T𝑥).




Aucun commentaire:

Enregistrer un commentaire