Dimension reduction in heterogeneous parametric spaces with application to naval engineering shape design problems