search for: matrixifi

Displaying 1 result from an estimated 1 matches for "matrixifi".

Did you mean: matrixify
2012 Feb 09
1
How to properly build model matrices
I always bump into a few (very minor) problems when building model matrices with e.g.: train = model.matrix(label~., read.csv('train.csv')) target = model.matrix(label~., read.csv('target.csv')) (1) The two may have different factor levels, yielding different matrices. I usually first rbind the data frames together to "meld" the factors, and then split them apart and