Added learn API

Keeping consistency: *See an example above*