I have a dataset of 150 observations and I want to make a linear model to try to explain relations. I use backwards regression. When I keep all variables (10), I have an adjusted R² value of 0.8076. When I remove the variables with p-values higher than 5% in order from highest to lowest, the adjusted R² value goes up to 0.8189. This leaves me with 6 variables, which is still quite a lot. Adding the $log_{10}$ of one of the variables also improves the R² variable ever so slightly to 0.8259, doing this let's me remove a different variable since its p-value has rised to 16%. Removing more variables drops the adjusted R² value to $\approx$ 0.79xx depending on which variable I remove. My question is, when should I stop removing variables? As soon as I see the adjusted R²-value drop or should I wait until my adjusted R² value drops below a certain value? Or should I look at something else? Thanks in advance!
I have run a multiple linear regression using stepwise regression to select the best model, however the best model returned has a non-significant variable. When I remove this the AIC value goes up indicating the model without the significant variable is a worse fit. Should I remove the non-significant predictor or should I leave it in as it is a better model?
When is the move constructor called in the `std::move()` function? Windows 7 unidentified network (or limited access) after hibernate My windows 7 network will show limited access or unidentified network after coming up from hibernation.  In the office I normally use LAN connection, I turn-off my wireless card (DELL Latitude has on/off switch for the wireless card). When I back at home I will turn on the wireless card, but it will take about 15 seconds to detect my home WIFI and then show limited access. I will have to restart the notebook and it will be able to connect to my WIFI and internet.  The problem will be solved if I restart the notebook, but that defeats the purpose of hibernation doesn't it?  I have tried uninstalling the wireless card driver but still does not solve it. I also tried updating my network card driver but windows says I am using the latest driver. On support.dell.com also showing I am using the latest driver. Remove all files/directories except for one file I have a directory containing a large number of files. I want to delete all files except for file.txt . How do I do this?  There are too many files to remove the unwanted ones individually and their names are too diverse to use * to remove them all except this one file.  Someone suggested using   rm !(file.txt)   But it doesn't work. It returns:  Badly placed ()'s    My OS is Scientific Linux 6.  Any ideas? Consider:  List&lt;String&gt; someList = new ArrayList&lt;String&gt;(); // add "monkey", "donkey", "skeleton key" to someList     for (String item : someList) {     System.out.println(item); }   What would the equivalent for loop look like without using the for each syntax? Training on the full dataset after cross-validation? TL:DR: Is it ever a good idea to train an ML model on all the data available before shipping it to production? Put another way, is it ever ok to train on all data available and not check if the model overfits, or get a final read of the expected performance of the model?    Say I have a family of models parametrized by $\alpha$. I can do a search (e.g. a grid search) on $\alpha$ by, for example, running k-fold cross-validation for each candidate.   The point of using cross-validation for choosing $\alpha$ is that I can check if a learned model $\beta_i$ for that particular $\alpha_i$ had e.g. overfit, by testing it on the "unseen data" in each CV iteration (a validation set). After iterating through all $\alpha_i$'s, I could then choose a model $\beta_{\alpha^*}$ learned for the parameters $\alpha^*$ that seemed to do best on the grid search, e.g. on average across all folds.  Now, say that after model selection I would like to use all the the data that I have available in an attempt to ship the best possible model in production.  For this, I could use the parameters $\alpha^*$ that I chose via grid search with cross-validation, and then, after training the model on the full ($F$) dataset, I would a get a single new learned model $\beta^{F}_{\alpha^*}$   The problem is that, if I use my entire dataset for training,  I can't reliably check if this new learned model $\beta^{F}_{\alpha^*}$ overfits or how it may perform on unseen data. So is this at all good practice? What is a good way to think about this problem? Create a shortcut for URL? What countries allow me to pass their borders visa-free?  Am I allowed to visit and work in EU and Schengen countries? gluten free hot cross buns Send urgent mail in Gmail Is it possible to set the "urgent" flag in Gmail for outgoing mail? I'd like to be able to flag time-sensitive emails as such. If $\frac{\cos x}{\cos y}+\frac{\sin x}{\sin y}=-1$, then what's the value of $4\left(\frac{\cos^3y}{\cos x}+\frac{\sin^3y}{\sin x}\right)$? Access: Making a Pivot Table with Multiple, Same Values as Columns How to code around known MMa special-case failures? What is the difference between can and could in 'Can/could you please explain this to me?' Create custom fields with apex Anybody knows how to create custom text fields on salesforce.com objects using apex? Is $\mathbf{Q}(\sqrt{2}, \sqrt{3}) = \mathbf{Q}(\sqrt{2}+\sqrt{3})$? I often see questions edited into this form:     Lorem ipsum dolor sit amet blah blah blah paragraph paragraph original question.            UPDATE: The Lorem disappeared and left this message: "new information".   I find this format unaesthetic (since Stack Exchange posts are supposed to be useful in the long term and update boundaries are artifacts of the creation rather than the content) and feel that new information should, whenever possible, be incorporated into the original text “as if it had always been that way” if practical, and pointing out an update should be done mostly in comments.  Is this an appropriate writing style, and if so under what circumstances? If not, should it be removed or discouraged? Well, this question has been puzzling me for kinda long time, many people believe that orbiting astronauts feel weightless because they are "beyond the pull of Earth's gravity"...How far from the Earth would a spacecraft have to travel to be truly beyond the Earth's gravitational influence? If a spacecraft were really unaffected by Earth's gravity would it remain n orbit? If so, what is the real reason for weightlessness in orbit? How to find the 'sizeof' (a pointer pointing to an array)? First off, here is some code:  int main()  {     int days[] = {1,2,3,4,5};     int *ptr = days;     printf("%u\n", sizeof(days));     printf("%u\n", sizeof(ptr));      return 0; }   Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)? \vphantom and superscripts I just came across this idiom in some open-source Python, and I choked on my drink.  Rather than:  if isUp:     return "Up" else:     return "Down"   or even:  return "Up" if isUp else "Down"   the code read:  return isUp and "Up" or "Down"   I can see this is the same result, but is this a typical idiom in Python? If so, is it some performance hack that runs fast? Or is it just a once-off that needs a code review?