DATA MINING
Desktop Survival Guide by Graham Williams |
|||||
A factor has new levels |
This occurs when the training dataset does not contain examples of all of the levels of particular factor and the testing set contains examples of these other levels.
To remove unused levels from a factor:
> dataset$Target <- dataset$Target[,drop=TRUE] |