...
/Exercise: Dimensionality Reduction in Plotly
Exercise: Dimensionality Reduction in Plotly
Practice with some lab exercises.
We'll cover the following...
Exercise 1
Take the matrix , scale the data, apply principal component analysis and plot the first two principal components using Plotly Express.
Solution
This code snippet creates a PCA (principal component analysis) pipeline, transforms the input data using this pipeline, and visualizes the first two principal components using a scatter plot. Here’s an overview of the different parts of the code:
-
A pipeline is created using the
make_pipeline()
function on line 2 from the ...