Kernel distance measures for time series, random fields and other structured data