def adjusted_r2(self):
    'Calculate adjusted R2 for either the train model or the test model'
    r2 = self.r2()
    return (1 - (((1 - r2) * (self.train_length - 1)) / ((self.train_length - self.coeff_size) - 1)))
Calculate adjusted R2 for either the train model or the test model
def adjusted_r2(self):
    
    r2 = self.r2()
    return (1 - (((1 - r2) * (self.train_length - 1)) / ((self.train_length - self.coeff_size) - 1)))