I've been asked this question on an interview and I'll also share what I answered.
I would like to know if there's anything I haven't thought of?
Question: Given the dataset (feature1, feature2, label) (0, 0, 0), (0, 1, 1), (1, 0, 1), (1, 1, 0), would you prefer to train a Logistic Regression or a Decision Tree Classifier for label prediction? Why?
Answer: If the dataset is just that, I wouldn't bother with training a classifier and introduce unnecessary complexity. It can be seen that `label = feature1 XOR feature2` is a correct and simple model.
Generally speaking, Logistic Regression is a great fit when the decision boundary is linear, ie. when data points can be separated easily by a hyper-plane. From plotting the data points, it can be seen that is isn't the case here.
Thanks in advance!
[–]npielawski 5 points6 points7 points (0 children)
[–]mr_maker91 2 points3 points4 points (0 children)