Skip to content
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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

andruuhurst
Copy link

No description provided.

@tdhock
Copy link
Owner

tdhock commented Oct 11, 2019

hi @andruuhurst please commit and push your changes so I can code review.

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)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @tdhock i'm getting an error message

some err
mess

can you help?


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,
Copy link
Author

@andruuhurst andruuhurst Nov 1, 2019

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

Copy link
Author

@andruuhurst andruuhurst Nov 1, 2019

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?

Copy link
Owner

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
Copy link
Owner

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

Copy link
Author

@andruuhurst andruuhurst left a 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

@tdhock
Copy link
Owner

tdhock commented Nov 25, 2019

which data sets do you get that error on? I would imagine it depends on the random seed that you use, see help(set.seed) in R for more info.

any result figures yet?

@andruuhurst
Copy link
Author

@tdhock yes, I got a rough figure of one we discussed
figure-iregnet-baseline-comparison

@tdhock
Copy link
Owner

tdhock commented Nov 26, 2019

that's a good start, but it would be better to use a dotplot (geom_point in ggplot2) rather than bars. Also no need to put test folds in different colors. Can you please make a figure like that for all data sets? in ggplot2 use facet_wrap("data.set")

@andruuhurst
Copy link
Author

@tdhock absolutely, I'll get right on that.

@tdhock
Copy link
Owner

tdhock commented Dec 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants