-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Issue:
Got the following error message when only one feature is passed into the function polyFit().
"
getPoly() expects a matrix or a data.frame. The input will be coerced to a data.frame but you may wish to stop and provide one directly.
Error in t.default(xdata) : argument is not a matrix
In addition: Warning message:
In model_matrix(modelFormula, W, intercept, noisy, ...) :
model.matrix() reported the following error:
Error in model.frame.default(object, data, xlev = xlev) :
invalid type (list) for variable 'I(W^1)'
"
Code for reproducing the problem:
y <- as.factor(rep(c(0,1,1),20))
s <- rnorm(length(y))
dta <- data.frame(scores = s, y=y)
polyFit(dta,deg=1,use='glm')
I tried the following and it seems the function works for two features
dta2 <- data.frame(scores = s,scores_two = sort(s), y=y)
polyFit(dta2,deg=1,use='glm')