def generate_brownian_data(x_points=None, kernel_var = <NUM_LIT>, noise_var = <NUM_LIT>,<EOL>plot = False, points_num=<NUM_LIT:100>, x_interval = (<NUM_LIT:0>, <NUM_LIT:20>), random=True):
if x_points is None:<EOL><INDENT>x_points = generate_x_points(points_num, x_interval, random)<EOL>if x_points[<NUM_LIT:0>] != <NUM_LIT:0>:<EOL><INDENT>x_points[<NUM_LIT:0>] = <NUM_LIT:0><EOL><DEDENT><DEDENT>y_points = np.zeros( (points_num,) )<EOL>for i in range(<NUM_LIT:1>, points_num):<EOL><INDENT>noise = np.random.randn() * np.sqrt(kernel_var * (x_points[i] - x_points[i-<NUM_LIT:1>]))<EOL>y_points[i] = y_points[i-<NUM_LIT:1>] + noise<EOL><DEDENT>y_points += np.random.randn( len(x_points) ) * np.sqrt(noise_var)<EOL>return x_points, y_points<EOL>
Generate brownian data - data from Brownian motion.
First point is always 0, and \Beta(0) = 0  - standard conditions for Brownian motion.           

Input:
--------------------------------

x_points: np.array
    Previously generated X points
variance: float 
    Gaussian noise variance added to the sine function
plot: bool
    Whether to plot generated data

(if x_points is None, the the following parameters are used to generate
those. They are the same as in 'generate_x_points' function)        

points_num: int

x_interval: tuple (a,b)

random: bool