C3 AI Documentation Home

PCA Transform

Transform your data to have a smaller number of dimensions using principal component analysis (PCA).

Configuration

FieldDescription
Name default=noneA user-specified node name displayed in the canvas
Prediction Column Name default=PCAThe name of the transformed column Specify the name of the column that will contain the PCA-transformed version of the data.

Node Inputs/Outputs

InputsA Visual Notebooks dataframe and a PCA model
OutputA dataframe containing a new column with the PCA-transformed data

Example dataframe output

Figure 1: Example dataframe output

Examples

The dataframe shown below is used in this example. It contains data on four features of over 300 penguins. We would like to use PCA to reduce the number of dimensions from four to two.

Example input data

Figure 2: Example input data

  1. Connect the PCA Transform node to your data and a trained PCA node.
  2. Select Run.

There are now additional columns highlighted in blue in the dataframe containing the PCA values.

Example node connections

Figure 3: Node connection examples

Example dataframe with default settings

Figure 4: Example dataframe with default settings

Was this page helpful?