pipeline the impact of leaking information in the cross-validation varies depending on the nature of the preprocessing step estimating the scale of the data using the test fold usually doesn' have terrible impactwhile using the test fold in feature extraction and feature selection can lead to substantial differences in outcomes illustrating information leakage great example of leaking information in cross-validation is given in hastietibshiraniand friedman' book the elements of statistical learningand we reproduce an adapted version here let' consider synthetic regression task with samples and , features that are sampled independently from gaussian distribution we also sample the response from gaussian distributionin[ ]rnd np random randomstate(seed= rnd normal(size=( ) rnd normal(size=( ,)given the way we created the datasetthere is no relation between the dataxand the targety (they are independent)so it should not be possible to learn anything from this dataset we will now do the following firstselect the most informative of the features using selectpercentile feature selectionand then we evaluate ridge regressor using cross-validation algorithm chains and pipelines