DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


TFrmPCA

The class TFrmPCA supports the management of the user interface of the principal component analysis (PCA). Please note that you cannot create an instance of this class yourself (the class has no public Create method). In order to manipulate the parameters of the PCA you have first to call the function PCAGui. This will display the PCA user interface and create the instance FrmPCA which is then globally available throughout a script.

The class TFrmPCA provides the following properties and methods:

Properties

 

Methods

Hint: If you use the global instance FrmPCA before you have called PCAGui this will result in an error message ("Could not call proc at ....")

Example: The following code snippet loads a dataset, creates the user interface of the PCA, loads the descriptors, sets a few parameters, and finally calculates the principal components and saves the PC image of component 2 on a file:
program PCATest;

var
  FVers : integer;

begin
if LoadDlabFile (GetDLabDir(ddWork)+'iris_500.idt', FVers, true) = 0 then
  begin
  PCAGui(1);
  if FrmPCA.LoadDescriptors ([2,3,4]) = 0 then
    begin
    FrmPCA.AttachedForm := true;
    FrmPCA.Left := 100;
    FrmPCA.Top := 50;
    FrmPCA.Width := 800;
    FrmPCA.Height := 700;
    FrmPCA.Calculate;
    FrmPCA.AttributeDisplayMode := 0;
    FrmPCA.UseClassColors := true;
    FrmPCA.SymbolIndex := 26;
    FrmPCA.ResultsTab := 5;
    FrmPCA.PCXAxis := 1;
    FrmPCA.PCYAxis := 2;
    end;
  end;
end.