Behavioral Data Mining scala code