Linearity versus non-linearity
Another consideration is decision boundaries. Some algorithms, such as logistic regression or Support Vector Machine (SVM), can learn linear decision boundaries while others, such as tree-based algorithms, can learn non-linear decision boundaries. While linear decision boundaries are relatively easy to calculate and interpret, you should be aware of errors that linear algorithms will generate in the presence of non-linear relationships.
Drawing decision boundaries
The following code snippet will allow you to examine the decision boundaries of different types of algorithms:
import matplotlib.cm as cm # This function will scale training datatset and train given classifier. # Based on predictions it will draw decision boundaries. def draw_decision_boundary(clf, X, y, h = .01, figsize=(9,9), boundary_cmap=cm.winter, points_cmap=cm.cool): # After you apply StandardScaler, feature means will be removed and all features will have unit variance. from sklearn...