# dimension of the projected space that we need to obtain a theoretical 1.5 distortion
# (max. expansion), when 20 data examples are available.
d <- JL.predict.dim(n=20, epsilon = 0.5)
# dimension of the projected space that we need to obtain a theoretical 1.2 distortion
#(max. expansion), when 20 data examples are available, and 10 random projections
d <- JL.predict.dim.multiple(n=20, epsilon = 0.5, t = 10)
# distortion 1+epsilon that is obtained with 30 examples and a random projection
# in a 100-dimensional subspace
epsilon <- JL.predict.distortion(n=30, dim = 100)
Run the code above in your browser using DataLab