def test_accuracy(self):
   acc1 = wrappers.accuracy(self.fc_oil)
   acdf1 = converters.accuracy(acc1)
   acdf1.shape == (7, 1)
   list(acdf1.columns) == ['Train']
   acc2 = wrappers.accuracy(self.fc_oil, 350)
   acdf2 = converters.accuracy(acc2)
   acdf2.shape == (7, 2)
   set(acdf2.columns) == {'Train', 'Test'}
   self.assertTrue(acdf1.Train.round(5).equals(acdf2.Train.round(5)))
   self.assertAlmostEqual(acdf2.Test.ix['ME'], -20.3502, places=3)
   self.assertAlmostEqual(acdf2.Test.ix['MAE'], 20.3502, places=3)
   self.assertAlmostEqual(acdf2.Test.ix['RMSE'], 20.3502, places=3)
 def test_accuracy(self):
   acc1 = wrappers.accuracy(self.fc_oil)
   acdf1 = converters.accuracy(acc1)
   acdf1.shape == (7, 1)
   list(acdf1.columns) == ['Train']
   acc2 = wrappers.accuracy(self.fc_oil, 350)
   acdf2 = converters.accuracy(acc2)
   acdf2.shape == (7, 2)
   set(acdf2.columns) == {'Train', 'Test'}
   self.assertTrue(acdf1.Train.round(5).equals(acdf2.Train.round(5)))
   r_test_vals = list(acc2.rx(2, True))
   r_cols = list(robjects.r.colnames(acc2))
   self.assertAlmostEqual(acdf2.Test['ME'], 
                          r_test_vals[r_cols.index('ME')], places=3)
   self.assertAlmostEqual(acdf2.Test['MAE'], 
                          r_test_vals[r_cols.index('MAE')], places=3)
   self.assertAlmostEqual(acdf2.Test['RMSE'], 
                          r_test_vals[r_cols.index('RMSE')], places=3)
 def test_accuracy(self):
     acc1 = wrappers.accuracy(self.fc_oil)
     acdf1 = converters.accuracy(acc1)
     acdf1.shape == (7, 1)
     list(acdf1.columns) == ['Train']
     acc2 = wrappers.accuracy(self.fc_oil, 350)
     acdf2 = converters.accuracy(acc2)
     acdf2.shape == (7, 2)
     set(acdf2.columns) == {'Train', 'Test'}
     self.assertTrue(acdf1.Train.round(5).equals(acdf2.Train.round(5)))
     r_test_vals = list(acc2.rx(2, True))
     r_cols = list(robjects.r.colnames(acc2))
     self.assertAlmostEqual(acdf2.Test['ME'],
                            r_test_vals[r_cols.index('ME')],
                            places=3)
     self.assertAlmostEqual(acdf2.Test['MAE'],
                            r_test_vals[r_cols.index('MAE')],
                            places=3)
     self.assertAlmostEqual(acdf2.Test['RMSE'],
                            r_test_vals[r_cols.index('RMSE')],
                            places=3)