Statistical learning theory of structured data