Content deleted Content added
m →Example |
|||
Line 103:
#We first draw a uniform random value ''y'' from the range of f(x) in order to define our slice(es). f(x) ranges from 0 to ~0.1330, so any value between these two extremes suffice. Suppose we take ''y'' = 0.1. The problem becomes how to sample points that have values ''y'' > 0.1.
#Next, we set our width parameter ''w'' which we will use to expand our region of consideration. This value is arbitrary. Suppose ''w'' = 2.
#Next, we need an initial value for ''x''. We draw ''x'' from the uniform distribution within the ___domain of f(x) which satisfies f(x) > 0.1 (our ''y'' parameter). Suppose ''x'' = 2. This works because f(2) = ~0.1065 > 0.1.<ref>Note that if we didn't know how to select ''x'' such that f(x) > ''y'', we can still pick any random value for ''x'', evaluate f(x), and use that as our value of ''y''. ''y'' only initializes the algorithm; as the algorithm progresses it will find higher and higher values of ''y''.</ref>
#Because ''x'' = 2 and ''w'' = 2, our current region of interest is bounded by (1, 3).
#Now, each endpoint of this area is tested to see if it lies outside the given slice. Our right bound lies outside our slice (f(3) = ~0.0807 < 0.1), but the left value does not (f(1) = ~0.1258 > 0.1). We expand the left bound by adding ''w'' to it until it extends past the limit of the slice. After this process, the new bounds of our region of interest are (-3,3).
|