add  function learn, get prediction