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

Sampe code fails in setHyperPars2 #1

Open
annette987 opened this issue Dec 6, 2018 · 1 comment
Open

Sampe code fails in setHyperPars2 #1

annette987 opened this issue Dec 6, 2018 · 1 comment

Comments

@annette987
Copy link

I have been trying to run the code you provided in file fouodo-koenig-weihs-ziegler-wright.R
As soon as it gets to the first benchmarking step:

tunwrp.gm.reg <- tuneWrapperGammaMu(type = "regression",
                                    kernel = "lin_kernel", 
                                    opt.meth = "quadprog", method = "CV",
                                    iters.rep = 5)
bench.vet.ssvm.reg <- benchmark(learners = tunwrp.gm.reg, tasks = veteran.task,
                                resamplings = outer, measures = list(c.i, lgrk, hr))

it fails as follows:

[Tune-x] Setting hyperpars failed: Error in setHyperPars2.Learner(learner$next.learner, par.vals = par.vals[i]) : 
  0.0009766 is not feasible for parameter 'gamma.mu'!

The full traceback is:

Task: veteran.adj, Learner: surv.survivalsvm.preproc.tuned
Resampling: cross-validation
Measures:             ci        logrank   hr        
[Tune] Started tuning learner surv.survivalsvm.preproc for parameter set:
             Type len Def                                   Constr Req Tunable Trafo
gamma.mu discrete   -   - 0.0009765625,0.001953125,0.00390625,0...   -    TRUE     -
center    logical   -   -                                        -   -    TRUE     -
scale     logical   -   -                                        -   -    TRUE     -
With control class: TuneControlGrid
Imputation value: -0
[Tune-x] Setting hyperpars failed: Error in setHyperPars2.Learner(learner$next.learner, par.vals = par.vals[i]) : 
  0.0009766 is not feasible for parameter 'gamma.mu'!

[Tune-x] 1: gamma.mu=0.0009765625; center=TRUE; scale=TRUE
[Tune-y] 1: ci.test.mean=      NA; time: 0.0 min
[Tune-x] Setting hyperpars failed: Error in setHyperPars2.Learner(learner$next.learner, par.vals = par.vals[i]) : 
  0.001953 is not feasible for parameter 'gamma.mu'!

[Tune-x] 2: gamma.mu=0.001953125; center=TRUE; scale=TRUE
[Tune-y] 2: ci.test.mean=      NA; time: 0.0 min
[Tune-x] Setting hyperpars failed: Error in setHyperPars2.Learner(learner$next.learner, par.vals = par.vals[i]) : 
  0.003906 is not feasible for parameter 'gamma.mu'!

[Tune-x] 3: gamma.mu=0.00390625; center=TRUE; scale=TRUE
[Tune-y] 3: ci.test.mean=      NA; time: 0.0 min
[Tune-x] Setting hyperpars failed: Error in setHyperPars2.Learner(learner$next.learner, par.vals = par.vals[i]) : 
  0.007812 is not feasible for parameter 'gamma.mu'!

[Tune-x] 4: gamma.mu=0.0078125; center=TRUE; scale=TRUE
[Tune-y] 4: ci.test.mean=      NA; time: 0.0 min
[Tune-x] Setting hyperpars failed: Error in setHyperPars2.Learner(learner$next.learner, par.vals = par.vals[i]) : 
  0.01562 is not feasible for parameter 'gamma.mu'!

[Tune-x] 5: gamma.mu=0.015625; center=TRUE; scale=TRUE
[Tune-y] 5: ci.test.mean=      NA; time: 0.0 min
[Tune-x] 6: gamma.mu=0.03125; center=TRUE; scale=TRUE
Warning in train(.learner$next.learner, .task) :
  Could not train learner surv.survivalsvm: Error in quadprog::solve.QP(C, -d, t(H), f, meq = meq) : 
  constraints are inconsistent, no solution!

Warning in train(.learner$next.learner, .task) :
  Could not train learner surv.survivalsvm: Error in quadprog::solve.QP(C, -d, t(H), f, meq = meq) : 
  constraints are inconsistent, no solution!

[Tune-y] 6: ci.test.mean=     NaN; time: 0.0 min
[Tune-x] 7: gamma.mu=0.0625; center=TRUE; scale=TRUE
Warning in train(.learner$next.learner, .task) :
  Could not train learner surv.survivalsvm: Error in quadprog::solve.QP(C, -d, t(H), f, meq = meq) : 
  constraints are inconsistent, no solution!

Warning in train(.learner$next.learner, .task) :
  Could not train learner surv.survivalsvm: Error in quadprog::solve.QP(C, -d, t(H), f, meq = meq) : 
  constraints are inconsistent, no solution!

[Tune-y] 7: ci.test.mean=     NaN; time: 0.0 min
[Tune-x] 8: gamma.mu=0.125; center=TRUE; scale=TRUE
[Tune-y] 8: ci.test.mean=0.7070195; time: 0.0 min
[Tune-x] 9: gamma.mu=0.25; center=TRUE; scale=TRUE
[Tune-y] 9: ci.test.mean=0.7143521; time: 0.0 min
[Tune-x] 10: gamma.mu=0.5; center=TRUE; scale=TRUE
[Tune-y] 10: ci.test.mean=0.7081605; time: 0.0 min
[Tune-x] 11: gamma.mu=1; center=TRUE; scale=TRUE
[Tune-y] 11: ci.test.mean=0.7264289; time: 0.0 min
[Tune-x] 12: gamma.mu=2; center=TRUE; scale=TRUE
[Tune-y] 12: ci.test.mean=0.7191989; time: 0.0 min
[Tune-x] 13: gamma.mu=4; center=TRUE; scale=TRUE
[Tune-y] 13: ci.test.mean=0.7137441; time: 0.0 min
[Tune-x] 14: gamma.mu=8; center=TRUE; scale=TRUE
[Tune-y] 14: ci.test.mean=0.7136500; time: 0.0 min
[Tune-x] 15: gamma.mu=16; center=TRUE; scale=TRUE
[Tune-y] 15: ci.test.mean=0.6847218; time: 0.0 min
[Tune-x] 16: gamma.mu=32; center=TRUE; scale=TRUE
[Tune-y] 16: ci.test.mean=0.6745995; time: 0.0 min
[Tune-x] Setting hyperpars failed: Error in setHyperPars2.Learner(learner$next.learner, par.vals = par.vals[i]) : 
  64 is not feasible for parameter 'gamma.mu'! 

and so on. Each step fails in turn. Am I doing something wrong?
Thanks.
`

@fouodo
Copy link
Collaborator

fouodo commented Jan 2, 2019

Hi,

Thanks for this issue. What going wrong is the nonfeasible value of "gamma.mu". Regarding to the "makeRLearner.surv.survivalsvm" from the file "fouodo-koenig-weihs-ziegler-wright.R" parameter "gamma.mu" should take its values in 2^-5 - 2^5. So, just set new values to fix the error.

Regards!

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

No branches or pull requests

2 participants