Learning from structured data: theory, algorithms, and applications