Skip to main content
50 events
when toggle format what by license comment
Jun 20, 2023 at 20:01 comment added Tom Wenseleers @jbowman And yes, taking a fixed pre-specified lambda is not what most people do in the ML community. Though Bayesians do it all the time: they hate the idea of tuning lambda / the SD of your Gaussian prior based on your data... :-)
Jun 20, 2023 at 19:55 comment added Tom Wenseleers @jbowman My post was not meant to imply what you suggested was bad in any way, rather I wanted to show with these examples that ChatGPT4 produces much more accurate answers than how it is typically portrayed on SO...
Jun 20, 2023 at 19:50 comment added Tom Wenseleers @jbowman Thanks - yes, I know glmnet very well of course... I use it all time. But I also use hand-crafted ridge regressions all the time, e.g. iterative adaptive ridge regressions to approximate best subset regression in github.com/tomwenseleers/L0glm/blob/master/benchmarks/…. Then one does need a bit of a deeper understanding of what's going on. Anyway I'm all cool with it. Seems the OP is no longer around to ask which solution would be most useful for him & suit him best...
Jun 20, 2023 at 19:25 comment added jbowman Here's an example of what you can get with glmnet in just a few lines of code: statology.org/ridge-regression-in-r
Jun 20, 2023 at 19:23 comment added jbowman 1. lm does not select an "optimal" $\lambda$, but, for example, glmnet will, via cross-validation, require one line of code to do so. Using lm alone requires hand-crafting some approach to doing so; it is not a complete solution by any means. 2. if they use SAS, R, or Python, they do have such a package available. They are hardly rarities these days. Suggesting a lengthy hand-crafted approach to avoid typing in library(glmnet) seems... counterproductive.
Jun 20, 2023 at 16:45 comment added Tom Wenseleers @jbowman But my answer also just required have any linear least squares solver available right? Just a lm() call would do it in R, working with an augmented design matrix & outcome variable, but still only an lm. That is a canned routine. While you are assuming they have a package available to do ridge regression, like glmnet or the ridge package, which are both relatively more specialised...
Jun 20, 2023 at 16:21 comment added jbowman Yes, but the bulk of people just want to use a canned routine to do ridge etc. regression, and your answer isn't helpful to them, relatively speaking. It's like the fact that I drive a Miata with a manual transmission doesn't mean that I'm going to recommend a stick shift to someone who asks me for car recommendations; I know that only 1.5% of cars sold in America have manual transmissions and few people know how to use them, so I might mention it as a possibility, but it wouldn't be where my recommendation effort would lie. IMO your answer was interesting but only possibly useful.
Jun 20, 2023 at 14:52 history edited Tom Wenseleers CC BY-SA 4.0
added 5 characters in body
Jun 20, 2023 at 13:53 comment added Tom Wenseleers @Scortchi-ReinstateMonica Perhaps - I personally like to solve ridge & nonzero centered ridge regression as a regular LS problem with augmented observations (as in stats.stackexchange.com/questions/69205/…). Also immediately would allow for inference and so on & also works to put ridge penalty in a GLM by modifying the weighted LS step of the IRLS algo. It's at least much more detailed than the other answers. Mainly took issue with the SDL+OpenGL answer being deleted several times...
Jun 20, 2023 at 13:36 comment added Scortchi W.r.t. the ridge regression question, the approach described in the top-voted answer is more straightforward than the one described in yours, gives the same result, & moreover can be used with LASSO or the elastic net: it seems unfair to characterize it as "inferior"; or at least it's easy to see why people might prefer it.
Jun 19, 2023 at 9:27 history edited Tom Wenseleers CC BY-SA 4.0
added 445 characters in body
Jun 19, 2023 at 9:21 history edited Tom Wenseleers CC BY-SA 4.0
added 445 characters in body
Jun 19, 2023 at 9:05 history edited Tom Wenseleers CC BY-SA 4.0
added 303 characters in body
Jun 19, 2023 at 8:59 history edited Tom Wenseleers CC BY-SA 4.0
added 303 characters in body
Jun 19, 2023 at 7:39 history edited Tom Wenseleers CC BY-SA 4.0
added 1660 characters in body
Jun 18, 2023 at 21:28 history edited Tom Wenseleers CC BY-SA 4.0
deleted 84 characters in body
Jun 18, 2023 at 20:41 history edited Tom Wenseleers CC BY-SA 4.0
added 15 characters in body
Jun 18, 2023 at 20:13 history edited Tom Wenseleers CC BY-SA 4.0
deleted 16 characters in body
Jun 18, 2023 at 18:26 history edited Tom Wenseleers CC BY-SA 4.0
deleted 3 characters in body
Jun 18, 2023 at 18:18 history edited Tom Wenseleers CC BY-SA 4.0
added 157 characters in body
Jun 18, 2023 at 18:13 history edited Tom Wenseleers CC BY-SA 4.0
added 157 characters in body
Jun 18, 2023 at 18:01 history edited Tom Wenseleers CC BY-SA 4.0
added 355 characters in body
Jun 18, 2023 at 17:34 history edited Tom Wenseleers CC BY-SA 4.0
added 1313 characters in body
Jun 18, 2023 at 10:42 history edited Tom Wenseleers CC BY-SA 4.0
added 172 characters in body
Jun 18, 2023 at 8:23 history edited Tom Wenseleers CC BY-SA 4.0
added 28 characters in body
Jun 18, 2023 at 7:13 history edited Tom Wenseleers CC BY-SA 4.0
added 3 characters in body
Jun 18, 2023 at 7:02 history edited Tom Wenseleers CC BY-SA 4.0
added 1207 characters in body
Jun 18, 2023 at 6:40 history edited Tom Wenseleers CC BY-SA 4.0
added 597 characters in body
Jun 17, 2023 at 23:16 history edited Tom Wenseleers CC BY-SA 4.0
deleted 256 characters in body
Jun 17, 2023 at 23:10 history edited Tom Wenseleers CC BY-SA 4.0
deleted 3 characters in body
Jun 17, 2023 at 23:02 history edited Tom Wenseleers CC BY-SA 4.0
added 74 characters in body
Jun 17, 2023 at 22:42 history edited Tom Wenseleers CC BY-SA 4.0
added 286 characters in body
Jun 17, 2023 at 22:33 history edited Tom Wenseleers CC BY-SA 4.0
added 175 characters in body
Jun 17, 2023 at 22:25 history edited Tom Wenseleers CC BY-SA 4.0
added 568 characters in body
Jun 17, 2023 at 22:14 history edited Tom Wenseleers CC BY-SA 4.0
added 26 characters in body
Jun 17, 2023 at 22:12 comment added Tom Wenseleers Yes indeed - three times no less - maybe they wanted to show what a great, warm community Stack Overflow is, where you can benefit from all those lovely interactions with real humans. I think for now I'm going to stick to ChatGPT4 for a while. At least until I don't have to fear for being banned for posting a few lines of illegal GPT code. ChatGPT4 is really lovely. It never labels my questions as duplicates and always finds my questions fascinating! And always congratulates me on my thoroughness in challenging GPT if I ask for some extra clarification. :-)
Jun 17, 2023 at 22:00 comment added Franck Dernoncourt Great examples! ChatGPT4 never ceases to amaze me. Very ironic that mods deleted the answer you posted to your own question. I guess some people just prefer to waste human time.
Jun 17, 2023 at 21:43 history edited Tom Wenseleers CC BY-SA 4.0
added 158 characters in body
Jun 17, 2023 at 21:14 history edited Tom Wenseleers CC BY-SA 4.0
added 70 characters in body
Jun 17, 2023 at 21:06 history edited Tom Wenseleers CC BY-SA 4.0
added 70 characters in body
Jun 17, 2023 at 20:34 history edited Tom Wenseleers CC BY-SA 4.0
added 106 characters in body
Jun 17, 2023 at 20:26 history edited Tom Wenseleers CC BY-SA 4.0
added 216 characters in body
Jun 17, 2023 at 20:20 history edited Tom Wenseleers CC BY-SA 4.0
added 216 characters in body
Jun 17, 2023 at 20:10 history edited Tom Wenseleers CC BY-SA 4.0
added 451 characters in body
Jun 17, 2023 at 19:42 history edited Tom Wenseleers CC BY-SA 4.0
added 741 characters in body
Jun 17, 2023 at 18:57 history edited Tom Wenseleers CC BY-SA 4.0
added 1074 characters in body
Jun 17, 2023 at 17:25 history edited Tom Wenseleers CC BY-SA 4.0
added 23 characters in body
Jun 17, 2023 at 17:07 history edited Tom Wenseleers CC BY-SA 4.0
added 116 characters in body
Jun 17, 2023 at 16:53 history edited Tom Wenseleers CC BY-SA 4.0
added 1155 characters in body
Jun 17, 2023 at 13:39 history answered Tom Wenseleers CC BY-SA 4.0