3featureengineering
Creating New Features
Check if feature actually important
from matplotlib import pyplot
import numpy as np
%matplotlib inline
bins = np.linspace(0, 200, 40) #40 #'sfrom 0-200,
pyplot.hist(data[data['label'] == 'spam']['body_len'], bins, alpha=0.5, normed=True) #normed normalized to some scale
pyplot.hist(data[data['label'] == 'ham']['body_len'], bins, alpha=0.5, normed=True)
pyplot.legend(loc='upper left')
pyplot.show()Transformations
Where
Box-Cox Power Transformation
Last updated