Creating three-dimensional scatter plots to present principal components
Principal components are nothing more than multidimensional vectors that we can use to transform our data. By finding the principal dimensions of our data, we can discover a different picture that our data paints.
To execute this recipe, you will need
Matplotlib with MPL Toolkits. These should come preinstalled if you are using the Anaconda distribution of Python. No other prerequisites are required.
How to do it…
To plot our three-dimensional data, we will use the
plot_components(...) method (the
def plot_components(z, y, color_marker, **f_params): ''' Produce and save the chart presenting 3 principal components ''' # import necessary modules import ...