def test_numberOfCoefficients(self):
     with open(self.test_f, "r") as f:
         test_soup = BeautifulSoup(f, "xml")
         test_num_preds = test_soup.find_all("NumericPredictor")
     self.assertEqual(len(LinearRegression.from_pmml(self.test_f).coef_), len(test_num_preds))
 def test_noIntercept(self):
     self.assertIsInstance(LinearRegression.from_pmml(self.test_f_noIntercept), LinearRegression)
 def test_coefficientsInNumpyArray(self):
     self.assertIsInstance(LinearRegression.from_pmml(self.test_f).coef_, numpy.ndarray)
 def test_readPMML(self):
     self.assertTrue(LinearRegression.from_pmml(self.test_f))