kenstone.m

% -------------------------------------------------------------------------
% Function: [model,test]=kenstone(X,k)
% -------------------------------------------------------------------------
% Aim:
% Subset selection with Kennard and Stone algorithm
% -------------------------------------------------------------------------
% Input:
% X, matrix (n,p), predictor variables in columns
% k, number of objects to be selected to model set
% -------------------------------------------------------------------------
% Output:
% model, vector (k,1), list of objects selected to model set
% test, vector (n-k,1), list of objects selected to test set (optionally)
% -----------------------------------------------------------------------
% Example: 
% [model,test]=kenstone(X,10)
% [model]=kenstone(X,10)
% -----------------------------------------------------------------------
% Reference:
% R.W. Kennard, L.A. Stone, Computer aided design of experiments, 
% Technometrics 11 (1969) 137-148
Valid CSS! Valid HTML 4.01!