def TestEncodeDataDecisionTree(self): # test encoder using the decision tree algorithm and label encoding encoded_data, encoder = bu.encode_data(self.df, 'Decision Tree') self.assertTrue(np.array_equal(encoded_data[:, 2], np.array([0, 1, 2, 3])))
def TestEncodeDataNaiveBayes(self): # test encoder using the Naive Bayes algorithm and one hot encoding encoded_data, encoder = bu.encode_data(self.df, 'Naive Bayes') self.assertTrue(np.array_equal(encoded_data[:, 2], np.array([1, 0, 0, 0])))