Session Ready
Exercise

Check the correlations

Before we fit our first machine learning model, let's look at the correlations between features and targets. Ideally we want large (near 1 or -1) correlations between features and targets. Examining correlations can help us tweak features to maximize correlation (for example, altering the timeperiod argument in the talib functions). It can also help us remove features that aren't correlated to the target.

To easily plot a correlation matrix, we can use seaborn's heatmap() function. This takes a correlation matrix as the first argument, and has many other options. Check out the annot option -- this will help us turn on annotations.

Instructions 1/2
undefined XP
  • 1
  • 2
  • Plot a heatmap of the correlation matrix (corr) we calculated in the last exercise (seaborn has been imported as sns for you).
  • Turn annotations on using the sns.heatmap() option annot=True. The font-size has already been set for you using annot_kws = {"size": 14}.
  • Show the plot with plt.show().`