-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this is attempt at iregnet pred #2
base: master
Are you sure you want to change the base?
Conversation
hi @andruuhurst please commit and push your changes so I can code review. |
iregnet.predictions.R
Outdated
keep.inputs <- apply(is.finite(data.list$inputs), 2, all) | ||
data.list$inputs <- data.list$inputs[, keep.inputs, drop=FALSE] | ||
#order.dt <- fread(testFold.csv) | ||
testFold.dt <- fread(testFold.csv) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iregnet.predictions.R
Outdated
|
||
for( model.type in c( "gaussian", "logistic", "extreme_value")){ | ||
for( scale.type in scale.i.list){ | ||
fit.list[length(fit.list) + 1] <- cv.iregnet(X.train, Y.train , family = model.type, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @tdhock
the for loops iterate through until it gets to the extreme_value. then I get this error
Error in stopifnot_error(paste("family must be one of", paste(names(pfun.list), : family must be one of gaussian, logistic, exponential
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried using iregnet( ...., extreme_value,..) instead and it returned this error
Error in dimnames(x) <- dn :
length of 'dimnames' [1] not equal to array extent
any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first of all you should use cv.iregnet
(which automatically performs selection of regularization/penalty parameter) and not iregnet
(which does not perform selection).
for a quick fix I would suggest using only logistic and gaussian (remove extreme value).
also please post a minimal reproducible example as an issue on https://github.com/anujkhare/iregnet/issues . Make sure to include what version of the software you are using, via the packageDescription command, this is what it looks like on my system,
> packageDescription("iregnet")
Package: iregnet
Type: Package
Title: Regularized interval regression
Version: 0.1.0.9000
Author: Anuj Khare <khareanuj18@gmail.com>, Toby D Hocking
<toby.hocking@r-project.org>, Jelle Goeman, Aditya Samantaray
<aditya.samantaray1@gmail.com>
Maintainer: Anuj Khare <khareanuj18@gmail.com>, Aditya Samantaray
<aditya.samantaray1@gmail.com>
Description: Interval regression with four types of censoring and
elastic net regularization.
License: GPL-3
LazyData: TRUE
Suggests: ElemStatLearn, glmnet, testthat, knitr, rmarkdown
LinkingTo: Rcpp
Depends: R (>= 2.10)
Imports: ggplot2, utils, methods, stats, survival, foreach, doParallel,
data.table, Matrix, namedCapture, penaltyLearning
RoxygenNote: 6.1.1
Remotes: tdhock/penaltyLearning
VignetteBuilder: knitr
RemoteType: github
RemoteHost: api.github.com
RemoteRepo: iregnet
RemoteUsername: anujkhare
RemoteRef: 4d77f047c3a00a5524e1cbe140226417e3aedd92
RemoteSha: 4d77f047c3a00a5524e1cbe140226417e3aedd92
GithubRepo: iregnet
GithubUsername: anujkhare
GithubRef: 4d77f047c3a00a5524e1cbe140226417e3aedd92
GithubSHA1: 4d77f047c3a00a5524e1cbe140226417e3aedd92
NeedsCompilation: yes
Packaged: 2019-07-19 18:40:17 UTC; th798
Built: R 3.6.1; x86_64-w64-mingw32; 2019-07-19 18:40:18 UTC; windows
-- File: C:/Users/th798/R/win-library/3.6/iregnet/Meta/package.rds
>
@@ -0,0 +1,131 @@ | |||
sequenceID,V1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a good start but please use a more informative column name instead of V1. for example typically I use pred.log.penalty or pred.log.lambda
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When trying to add the remaining pred files I was receiving this error
Error in dimnames(x) <- dn :
length of 'dimnames' [1] not equal to array extent
In addition: Warning message:
In fit_cpp(x.train, y, family, alpha, lambda_path = lambda, num_lambda = num_lambda, :
Ran out of iterations and failed to converge.
What's weird is that I would get this error inconsistently. I could retry it on the same data set and get a result and other times I won't. I have been working on it but could not figure out why it is happening
which data sets do you get that error on? I would imagine it depends on the random seed that you use, see any result figures yet? |
@tdhock yes, I got a rough figure of one we discussed |
that's a good start, but it would be better to use a dotplot ( |
@tdhock absolutely, I'll get right on that. |
No description provided.