Here is what I have :
A scaled training set, with labels.
Segmented images, from which I extract new vectors to classify.
My classifier is a KNN which would have obviously been trained using my training set.
Now, I wonder how I should scale those new vectors I just got. Is this correct to scale them on their own, or should I do something else ? I wonder for example if an outlier would have an effect on the scaling and subsequent classification...
[EDIT] adding an outlier (which I would like to detect using kNN algorithm) to the test datas does impact the scaling, so subsequent classification won't work properly. What should I do then ?
[EDIT 2] This is how I scale my data :
Which in Scilab I translate to :
function dataout = scaledata(datain) dataout = zeros(size(datain,1),size(datain,2)); for i=1:size(datain,2) dataout(1:size(datain,1),i) = (datain(1:$,i) - min(datain(1:$,i))) / ... (max(datain(1:$,i)) - min(datain(1:$,i))); end endfunction