Description Usage Arguments Details Value Author(s) References See Also Examples
Removes all columns of a data frame where a factor (or character string) has more than a maximum number of levels.
1 |
data |
data frame which contains the data. |
maxlevels |
number of maximum factor levels. |
na.omit |
logical value whether missing values should be treated as a level, defaults to omit missing values before counting. |
Often categories that have very many levels are not useful in modelling OneR rules because they result in too many rules and tend to overfit. Examples are IDs or names.
Character strings are treated as factors although they keep their datatype. Numeric data is left untouched. If data contains unused factor levels (e.g. due to subsetting) these are ignored and a warning is given.
A data frame.
Holger von Jouanne-Diedrich
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.