Your task is to build a model^(1) which can predict y-coordinate.
You can pass tests if predicted y-coordinates are inside error margin.
You will receive train set which should be used to build a model. 
After you build a model tests will call function ```predict``` and pass x to it. 
Error is going to be calculated with RMSE.
Blocked libraries: sklearn, pandas, tensorflow, numpy, scipy
Explanation
[1] A mining model is created by applying an algorithm to data, but it is more than an algorithm or a metadata container: it is a set of data, statistics, and patterns that can be applied to new data to generate predictions and make inferences about relationships.
class Datamining:
    
    def __init__(self, train_set):
        x_mean = lambda train_set: sum( [i[0] for i in train_set] ) / len( [i[0] for i in train_set] )
        y_mean = lambda train_set: sum( [i[1] for i in train_set] ) / len( [i[1] for i in train_set] )
        f = lambda x_mean, y_mean, train_set: sum( (x - x_mean) * (y - y_mean) for x, y in train_set )
        g = lambda x_mean, train_set: sum( (x - x_mean) ** 2 for x in [i[0] for i in train_set] )
        self.a = f( x_mean(train_set), y_mean (train_set), train_set ) / g ( x_mean (train_set), train_set )
        self.b = y_mean(train_set) - self.a * x_mean(train_set)
        
    def predict(self, x): return x * self.a + self.b
class Datamining:
    
    def __init__(self, train_set):
        x_mean = lambda train_set: sum( [i[0] for i in train_set] ) / len( [i[0] for i in train_set] )
        y_mean = lambda train_set: sum( [i[1] for i in train_set] ) / len( [i[1] for i in train_set] )
        f = lambda x_mean, y_mean, train_set: sum( (x - x_mean) * (y - y_mean) for x, y in train_set )
        g = lambda x_mean, train_set: sum( (x - x_mean) ** 2 for x in [i[0] for i in train_set] )
        self.a = f( x_mean(train_set), y_mean (train_set), train_set ) / g ( x_mean (train_set), train_set )
        self.b = y_mean(train_set) - self.a * x_mean(train_set)
        
    def predict(self, x): return x * self.a + self.b