introduced numStates parameter for inferencers in order to work properly with x-validation; introduces function to remove infrequent cells to improve accuracy