Visualizing interactions between features
Plotting the interactions between features can further your understanding of not only the distribution of your data, but also how the features relate to each other. In this recipe, we will show you how to create scatter plots from your data.
Getting ready
To execute this recipe, you need to have a working Spark environment. Also, we will be working off of the no_outliers
DataFrame we created in the Handling outliers recipe, so we assume you have followed the steps to handle duplicates, missing observations, and outliers.
No other prerequisites are required.
How to do it...
Once again, we will select our data from the DataFrame and expose it locally:
scatter = ( no_outliers .select('Displacement', 'Cylinders') ) scatter.registerTempTable('scatter') %%sql -o scatter_source -q SELECT * FROM scatter
How it works...
First, we select the two features we want to learn more about to see how they interact with each other; in our case they are the displacement...