Closed crj32 closed 5 years ago
The package sparsediscrim
was removed from CRAN. One cannot readily check the behaviour you report because of this.
Is it paramount you use hdrda
? If you have time to spare/invest/waste rda
and rrlda
are available if you want a regularised discriminant analysis, they will probably be much slower than hdrda
but should provide very similar results.
I suspect that the error you see is due to hdrda
not working well with single item input arguments during predictions.... You could probably use method = 'CV'
and define number = floor(N*0.5)
where N
is the number of points in your dataset. This will effectively cause the training procedure to be a Leave-Two-Out-Cross-Validation and should in theory take care of any problem with the output. That said, maybe using a Random Forest (e.g. method = 'ranger'
) will save you all this trouble. :)
The floor thing does not get rid of the error unfortunately. It would just be nice because it should perform a bit better than HDDA and we are working with very high dimensional data. It is OK though if it is too tricky to debug, thanks anyway.
Hmm... I would wait till the package reappears on CRAN or learn why it was removed to begin with... I checked the binary manually and it seems alright. I will make a manual install over the weekend and let you know if I can at least reproduce this issue.
The issues is with the hdrda
predict method. For a data frame with >1 rows, you get a nice data frame back but with a single row, it returns a numeric vector. I'm pretty sure that this is new because I specifically test for this when developing the model code and have a lot of regression test cases for this.
It could be changed in the predict module but I'm not inclined to spend the time if the package is orphaned. That isn't an indicator of poor quality but is probably more related to some new CRAN restriction/rule.
Oddly, it was orphaned on 2018-07-20 but the last official set of checks look fine, on 2018-08-17 for OS X, are okay. I would guess at some arcane gcc issues (on windows maybe).
An issue was opened two weeks ago so you could ask the developer.
I'll file an issue for this.
I don't think that the package is being supported 😩 I'll close this but please reopen if that changes.
Dear Caret maintainers
The following does not happen with other models, e.g. random forest. I want a ROC curve from HDRDA, and cannot get it, simple accuracy works OK. This function seems a bit dodgy compared with all the others I use which work v. well.
Thanks.
Error in
[.data.frame
(data, , lvls[1]) : undefined columns selectedMinimal, reproducible example:
Minimal dataset:
Minimal, runnable code:
Session Info: