Data structure

Data must be organised as samples (rows) x variables (columns). If available, a class (qualitative) or response (quantitative) vector can be loaded to colour samples. The class/response vector must have dimensions samples x 1. Class labels must be numerical. If G classes are present, class labels must range from 1 to G (0 values are not allowed). Type:

load data_toxicity

on the MATLAB command window to see an example of data structure. Both sample and variable labels can be used to visualize the results. Labels must be structured as cell array vectors with a number of entries equal to the number of samples or variables.

[-> top]

Starting the graphical interface

The PCA toolbox can work both on the MATLAB command window (see details) or with its graphical interface. The graphical interface enables you to do all the steps of the analysis (data loading, setting preparation, model calculation, analysis of results). In order to start the graphical interface, type the following code in the MATLAB command window:

pca_gui

the main form of the graphical interface will appear. In order to activate the menu of the form, data or models must be loaded. In the window, two listboxes will show the details of the loaded data (on the left) and of the loaded (or calculated) model (on the right).

[-> top]

Loading data and models

Data, class/response vectors, models and labels can be loaded directly from the matlab workspace or from a matlab data file, using the file menu. Here it is also possible to save models and predictions.

[-> top]

Viewing the data

Data (as well as basic plots and variable profiles) can be seen in the view menu. In this menu, samples can be also deleted from the dataset.

[-> top]

How to calculate models

In order to calculate PCA, MDS and Cluster Analysis select the calculate menu.

[-> top]

Viewing results

After the model calculation, the model window in the main form is updated with the model details (type of calculated models and options). Then, it is possible to analyse details of the calculated model in the results menu.

[-> top]

Saving results

Calculated models can be saved from the file menu.

[-> top]

Predicting new samples (only for PCA)

When a PCA model is loaded or calculated, a new set of samples can be loaded, overwriting the set of samples used for the calculation. This new set of samples can be predicted (projected in the PCA model) by using the predict menu.

[-> top]