Displaying 2 results from an estimated 2 matches for "cutfair".
Did you mean:
betfair
2018 Feb 08
2
sparse.model.matrix Generates Non-Existent Factor Levels if Ord.factor Columns Present
...g of factor levels that were not in the original dataset. The first factor appears to be correctly transformed, but the following factors don't. For example:
diamonds <- as.data.frame(ggplot2::diamonds)
> colnames(sparse.model.matrix(~ . -1, diamonds))
[1] "carat" "cutFair" "cutGood" "cutVery Good" "cutPremium" "cutIdeal" "color.L" "color.Q" "color.C" "color^4" "color^5"
[12] "color^6" "clarity.L" "cl...
2018 Feb 08
0
sparse.model.matrix Generates Non-Existent Factor Levels if Ord.factor Columns Present
...that were not in the original dataset. The first factor appears to be correctly transformed, but the following factors don't. For example:
>
> diamonds <- as.data.frame(ggplot2::diamonds)
>> colnames(sparse.model.matrix(~ . -1, diamonds))
> [1] "carat" "cutFair" "cutGood" "cutVery Good" "cutPremium" "cutIdeal" "color.L" "color.Q" "color.C" "color^4" "color^5"
> [12] "color^6" "clarity.L" &qu...