コード例 #1
0
 def TestEncodeDataDecisionTreeDF(self):
     # test conversion of encoded data to pandas dataframe using using the
     # decision tree classification algorithm
     encoded_df = bu.encode_data_df(self.df, 'Decision Tree')
     columns = encoded_df.columns.values
     self.assertEqual(columns[0], 'ID')
     self.assertEqual(columns[1], 'ProbWindDD')
     self.assertEqual(columns[2], 'WindDirection')
コード例 #2
0
 def TestEncodeDataNaiveBayesDF(self):
     # test conversion of encoded data to pandas dataframe using using the
     # Naive Bayes classification algorithm
     encoded_df = bu.encode_data_df(self.df, 'Naive Bayes')
     columns = encoded_df.columns.values
     self.assertEqual(columns[0], 'ID')
     self.assertEqual(columns[1], 'ProbWindDD')
     self.assertEqual(columns[2], 'North')
     self.assertEqual(columns[3], 'easT')
     self.assertEqual(columns[4], 'sOuTh')
     self.assertEqual(columns[5], 'west')