def r2(self):
    'Calculate R2 for either the train model or the test model'
    sse_sst = (self.sse() / self.sst())
    return (1 - sse_sst)
Calculate R2 for either the train model or the test model
def r2(self):
    
    sse_sst = (self.sse() / self.sst())
    return (1 - sse_sst)