
urmi bhambhani - 2012-10-18 06:10:35
In the function 'train', the array 'model' is not defined.
And the line "model[$f] += 1;" is used. Instead of that line, the code to be inserted is:
if(array_key_exists($f, $model))
$model[$f] += 1;
else
$model[$f] = 1;