Canonical Measure of Correlation (CMC) and Canonical Measure of Distance (CMD) between sets of data. Part 2. Variable reduction