Comments (2)
Hi Adrian,
Sorry for the delay. Note that QGAMs have an extra tuning parameter (the so-called "learning rate"), relative to standard GAMs. Fixing the smoothing parameters while selecting the learning rate is not a good idea, hence it is not currently allowed by qgam.To do what you want to do, you should fix both the learning rate and the smoothing paramters:
set.seed(123)
library(qgam)
x1 <- runif(100)
x2 <- runif(100)
y <- x1 + x2 + rnorm(100)
m1 <- qgam(y ~ s(x1) + s(x2), data = data.frame(y = y, x1 = x1, x2 = x2), 0.1)
m2 <- qgam(y ~ s(x2), lsig = m1$calibr$lsig, # <- fixing learning rate
data = data.frame(y = y, x2 = x2), 0.1, argGam = list(sp = m1$sp[2]))
The reason is that the hierarchy of parameters is
learning rate -> smoothing parameters -> regression coefficients
so letting the learning rate change, while fixing the smoothing parameter is a strange thing to do.
Maybe I'll add an explicit warning about this.
Best,
Matteo
from qgam.
That worked, many thanks!
Adrian
from qgam.
Related Issues (20)
- Modify bootstrapping when model includes random effects
- Prior weights under bootstrapping
- Memory error in PIRLS with zero weights?
- Find alternative to na.omit HOT 1
- Send message when multicore == TRUE and control$loss = "calFast"
- Fails to compile on Linux with "Mutex creation failed" error HOT 2
- undesirable effect of do.call HOT 2
- More careful calculation of penalized EDF
- small typo in vignette? HOT 1
- Error for small n (if (abs(old.score - score) > score.scale * conv.tol)) HOT 1
- Error when fitting qgam with only intercept included
- Error for small datasets - A term has fewer unique covariate combinations than specified maximum degrees of freedom HOT 2
- Expand family in qgam HOT 1
- Stability for low n / low unique predictor values HOT 5
- weights in qgam HOT 4
- number of items to replace is not a multiple of replacement length -> mObj issue? HOT 2
- potential conflict between doParallel / foreach and qgam HOT 3
- simulation from qgam posterior HOT 4
- random effects in qgam HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qgam.