0
$\begingroup$

I want to apply spatial sign transformation to my data, but unlike other transformations this one is stateless. I am using sklearn and normallly i would first use the .fit() function on training set and then .transfrom() on test set, but in the documantation it says (even though the fit method is useless in this case: the class is stateless as this operation treats samples independently). Since this is a transformation to reduce the influence of outliers should it be applied before the train/test split? Or should I just transform both sets independently?

The exact class i am using is Normalizer.

$\endgroup$
0
$\begingroup$

In this case it makes no difference due to the nature of the transform. It is equivalent, before/after makes no difference.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.