Created
February 11, 2015 20:02
-
-
Save JohannesBuchner/f05bf324a6d6d7e035e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def generateTuple(): | |
if numpy.random.uniform() > 0.05: | |
# generate from normal data set, e.g. normal distribution around some values -- here, a line | |
k = 1.16 | |
d = 8.9 | |
x = numpy.random.uniform(6, 12) | |
y = k * (x - 11) + d | |
return numpy.random.norm(x, 1), numpy.random.norm(y, 3) | |
else: | |
# generate from outlier distribution, e.g. uniform distribution over full parameter space | |
return numpy.random.uniform(6, 10), numpy.random.uniform(6, 10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment