function [ITr2 ITe2 NFS] = fs3(P, PT, T, th) % Feature Selector function 3 (irrelevant to 1 & 2). It is based on IDND3. Selects using harmean of IDs as threshold. % Requirements: ID3.m % Copyright by Zack Voulgaris, London, March - September 2007 sT = size(T); [N ind] = max(sT); % Number of elements [r na] = size(P); if r ~= N error('Dimensionality of Input and Output do not match!') end [r c] = size(PT); if c ~= na error('Dimensionality of Input and Output do not match!') end if sT(3-ind) ~= 1 error('Target Training must be a vector') end p(na) = 0; for i = 1:na p(i) = ID3(P(:,i),T); end if nargin < 4 th = harmean(p,2,eps); end NFS = find(p>=th); ITr2 = P(:,NFS); ITe2 = PT(:,NFS);