def generate_linear_data(x_points=None, tangent=<NUM_LIT>, add_term=<NUM_LIT:1.0>, noise_var=<NUM_LIT>,<EOL>plot = False, points_num=<NUM_LIT:100>, x_interval = (<NUM_LIT:0>, <NUM_LIT:20>), random=True):
linear_function = lambda xx:  tangent*xx + add_term<EOL>if x_points is None:<EOL><INDENT>x_points = generate_x_points(points_num, x_interval, random)<EOL><DEDENT>y_points = linear_function( x_points ) + np.random.randn( len(x_points) ) * np.sqrt(noise_var)<EOL>if plot:<EOL><INDENT>pass<EOL><DEDENT>return x_points, y_points<EOL>
Function generates linear data.

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

x_points: np.array
    Previously generated X points
tangent: float
    Factor with which independent variable is multiplied in linear equation.
add_term: float
    Additive term in linear equation.
noise_var: 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