← User manual

Feature extraction

Reduce variables with PCA, measure how similar your samples are to a reference set, and rebuild variables from principal components.

The Feature extraction module summarizes many numeric variables into a few components and compares datasets with each other. It works on the active project. At the top of the left panel you choose the Workflow:

WorkflowWhat it is for
PCACalculate principal components and save them as columns
SimilarityMeasure how similar each row is to a reference dataset
PCA post-processingGo back from the components to the original variables (inverse PCA)

Results appear on the right in three tabs: Summary, Chart, and Table. Clear removes the current result without touching your data. Nothing is written to the dataset until you press the save button of each workflow.

PCA

Principal component analysis combines correlated variables into new, independent components (PC1, PC2, …), ordered from highest to lowest explained variance.

  1. Under Data, choose the Dataset and the numeric Variables. You need at least two non-constant variables and two rows with a value in all of them.
  2. Under Parameters:
    • Threshold: correlations whose absolute value exceeds this number are highlighted in the correlation table.
    • Absolute values: the heatmap shows unsigned correlations (0 to 1), useful when only the strength of the relationship matters.
  3. Press Calculate.

The Summary shows the rows and variables used, the number of components, and the variance of each one. Constant, empty, or infinite-valued variables are discarded and listed separately.

PCA correlation circle with eight elements

Under Chart you can view:

  • Correlation circle: each variable as an arrow over two components. Arrows close together indicate correlated variables. Needs at least two components.
  • Explained variance: individual and cumulative variance per component, to decide how many components to keep.
  • Heatmap: correlation of each variable with each component.

Individual and cumulative explained variance per component

Table shows the correlations of each variable with each component (those above the Threshold are highlighted) and the explained variance, individual and cumulative in %.

Correlation and explained variance table

Save the components

Under Output, type the name of each component (PC1 name, …) and the Model name, and press Save PC values. The columns are added to the dataset and the model is saved in the project for use in PCA post-processing. Names must be unique and cannot repeat existing columns.

Similarity

Measures how much each uncharacterized row (for example, samples without an assay for a variable) resembles the characterized rows (those that have it). It tells you whether a model trained on the characterized samples can be applied confidently to the rest.

  1. Under Uncharacterized data, choose the dataset to evaluate and its Variables.
  2. Under Characterized data, choose where the reference rows come from:
    • Another dataset: choose the Characterized dataset. It must have the same variables.
    • Same dataset: choose the Target variable. Rows with a value in that column are the characterized ones, and empty rows are the uncharacterized ones.
  3. Press Calculate similarity.

Similarity curve relative to the nearest characterized sample

The Similarity chart sorts the evaluated data by their distance to the nearest characterized sample. Low values indicate rows very similar to the reference. The sharp rise at the end of the curve marks outlier rows that do not resemble any characterized sample.

Compare

To see how both sets differ:

  1. Adjust Data proportion [%] (10 to 100): takes that percentage of the uncharacterized data most similar to the reference.
  2. If you use another dataset, choose the Target variable.
  3. Press Compare.

PCA scatter plots both sets on the first two principal components. Characterized rows are colored by the target variable and uncharacterized rows appear in gray. If the gray points fall inside the colored cloud, both sets are comparable.

PCA scatter of characterized and uncharacterized data

Jitter compares the distribution of a variable between the Uncharacterized data (the chosen proportion) and the Characterized data. Choose the variable under Jitter variable.

Cu jitter in uncharacterized and characterized data

Save the result

Type the Output dataset and save. A new dataset is created with the similarity of each row, which you can filter or plot in EDA 2D and EDA 3D.

PCA post-processing

Rebuilds the original variables from principal component columns (inverse PCA). Use it, for example, after estimating the components in another dataset to get back to grades or concentrations.

  1. Under PCA model, choose a model saved from PCA. Delete model removes it from the project.
  2. To bring models from another project, under Import use Choose project file, type an optional Prefix for their names, and press Load PCA.
  3. Choose the Dataset to apply the model to.
  4. Under Column for PC1, … map each model component to a dataset column.
  5. Under Output for each variable, type the name of the rebuilt column. The default is <variable>_est. An output cannot be one of the component columns.
  6. Press Calculate inverse PCA. The Summary shows the output columns with their count, minimum, maximum, and mean, in Preview state.
  7. Press Save to write the columns. If any already exists, the app asks you to confirm before you Replace it.

Inverse PCA result in preview

Only rows with a value in all mapped component columns are calculated.