-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
With default parameters, maxnet() fails for some data frames:
dat <- read.csv("https://raw.githubusercontent.com/AMBarbosa/files/refs/heads/main/d.csv")
maxnet(p = dat[ , 1], data = dat[ , -1])
# Error in m[p == 1, ] : (subscript) logical subscript too long
I found that the error occurs within regfun(p, mm), at mm <- m[p == 1, ], because mm (the model matrix) has zero rows. The error does not occur if we do not use hinge features:
maxnet(p = dat[ , 1], data = dat[ , -1],
f = maxnet.formula(p = dat[ , 1],
data = dat[ , -1],
classes = "lqpt"))
# apparently OK
Metadata
Metadata
Assignees
Labels
No labels