Learning the models of customer behavior : from television advertising to online marketing