Error in predicting test data when apply predictio

2019-09-17 08:35发布

问题:

library(mda)

I'm using:

pred.test <- predict(model.fda, test.data) 
after model.fda <- fda(Y~., train.data)

but obtained the following message:

Error in mindist[l] <- ndist[l] : NAs are not allowed in subscripted assignments.

Thank you very much for the hint!

回答1:

I've solved this issue after normalizing the data (It was binary values only and maybe too sparse in my case).