I have a 100x45 dataset and I'd like to perform feature selection and classification/regression.   I'm currently using various techniques to check which one has the best performances, but I have a doubt about how to treat PCA + SVM or random Forest or CART. With other feature selection methods and elastic net, I'm performing Cross Validation (CV) to select the hyperparameters and to test the model, since I have few records and at the moment I'm not in the condition to increase them.   With PCA which is the best course of action? Train-test or CV? Should I perform PCA on the train set and then use the number of PCs on the test set? In the case of CV how can I proceed?
I have a dataset for which I have multiple sets of binary labels. For each set of labels, I train a classifier, evaluating it by cross-validation. I want to reduce dimensionality using principal component analysis (PCA). My question is:  Is it possible to do the PCA once for the whole dataset and then use the new dataset of lower dimensionality for cross-validation as described above? Or do I need to do a separate PCA for every training set (which would mean doing a separate PCA for every classifier and for every cross-validation fold)?  On one hand, the PCA does not make any use of the labels. On the other hand, it does use the test data to do the transformation, so I am afraid it could bias the results.  I should mention that in addition to saving me some work, doing the PCA once on the whole dataset would allow me to visualize the dataset for all label sets at once. If I have a different PCA for each label set, I would need to visualize each label set separately.
Proving “The sum of $n$ consecutive cubes is equal to the square of the sum of the first $n$ numbers.” This   states:      Example $\boldsymbol 3$. The sum of consecutive cubes. Prove this remarkable fact of arithmetic: $$1^3 +2^3 +3^3 +\ldots +n^3 =(1 +2 +3 +\ldots +n)^2.$$   “The sum of $n$ consecutive cubes is equal to the square of the sum of the first $n$ numbers.”      In other words, according to Example $1$: $$1^3 +2^3 +3^3 +\ldots +n^3 = \frac{n^2 (n+1)^2}{4}.$$   Should: $$1^3 +2^3 +3^3 +\ldots +n^3 = \frac{n^2 (n+1)^2}{4}$$ not be: $$1^3 +2^3 +3^3 +\ldots +n^3 = \frac{n^3 +(n + 1)^3}{2^3}$$ as everything in the left-hand side is cubed? I used a website called Seeking Arrangements and met a  sugar daddy. He asked for my email login, online banking login, routing, account number, Facebook, as well as my  address which is the only thing I gave him since it’s a PO. I’ve been extremely vague just to see if this is real.   I don’t plan to give him anything because I have only been talking to him for a few months and  I feel conflicted. I doubt that he is trying to scam me but I suspect that he has some kind of master plan. With things such as Venmo, Zelle, and Cashapp, what is the need for “put me on his payroll?”   He claims that he is in another country on a business trip.  He said that  he tried to send me a gift but he lost access to his card. He is now asking to deposit more than 10k into my account and have me wire it. Is this a l classic way of scamming people? If so, is it common that they spend months creating a relationship with you  to catfish you? Quite a few of the questions given on this site mention a photon in vacuum having a rest frame such as it having a zero mass in its rest frame. I find this contradictory since photons must travel at the speed of light in all frames according to special relativity.  Does a photon in vacuum have a rest frame? Visa for transit in Seoul I have a question about the visa needed to transit in Korea.  I'm an Indonesian passport holder and am traveling to the US. On the way back I have a transit of 24 hours at Incheon. If I want to go out and stay in Seoul, do I have to apply for a visa? Or can I get a transit visa on arrival? MySQL: LEFT JOIN not working as expected Feature request: Add pronouns to usercards? Can an observer B move in such a way that his clock will run faster than that of a fixed observer A? My understanding of Special and General Relativity comes from books which attempt to explain them to non-experts in these fields.   Let A and B be observers, which at some time t(0), are together at some location P fixed to the earth's surface. A and B are provided with "clocks", which at time t(0), are identical lumps of the same radioactive element-that has a very long half-life. A and A's "clock" remain fixed to the earth's surface. B and B's "clock" leave A and stay together, but eventually return to A after some interval of time T (as measured by A's "clock"). If, during this time T, B's velocity relative to A is sufficiently close to the velocity of light or B remains close to a sufficiently massive body, it seems that time can "pass more slowly" for B than for A. So that when B rejoins A, B's "clock" will contain more of the radioactive element than A's "clock"   My question is: Are there any scenarios that B together with B"s "clock" can undergo (during the time T) which will cause time to "pass more quickly" for B than for A? So that when B rejoins A, B's "clock" will contain less of the radioactive element than A's "clock". If there are no such scenarios, is there any fact or law in Relativity theory which rules them out? I know it has been discussed that it is not possible to start an application from an usb drive upon connection due to limitations of autorun (or autoplay??) in Win 7. But it is possible to create a scheduled task having an event type trigger. Surely there must be an event occurring when the drive -- or any USB device, for that matter -- is connected.    Does anybody have the slightest idea which Event ID should I use? Or at least what type of event? Where can I find the event in event viewer? What is the most preferred and easiest way to do pagination in ASP.NET MVC?  I.e. what is the easiest way to break up a list into several browsable pages.  As an example lets say I get a list of elements from a database/gateway/repository like this:  public ActionResult ListMyItems() {     List&lt;Item&gt; list = ItemDB.GetListOfItems();     ViewData["ItemList"] = list;      return View(); }   For simplicity's sake I'd like to specify just a page number for my action as parameter. Like this:  public ActionResult ListMyItems(int page) {    //... } How to make Latexmk use makeglossaries? How do I make my screenshot ask me what to do next every time? I take screenshots a lot. I usually take screenshot of an area, I then recheck if I have the desired area and then copy it to clipboard.  I want to change this behaviour so that immediately upon  pressing Shift+PrntScr the screen capture application allows me to select an area, and immediately afterwards it provides me with the option to save to a particular location or clipboard.  I want Shift+PrntScr to bring up a pop-up screen like this: How to pin Eclipse to the Unity launcher? 'Guest' vs 'Guest User License' in sites? Why is it that     All right angles are equal to each other    -a postulate in Euclid's Elements (). Shouldn't it be a congruence rather than an equivalence? Isn't this just a special case of the definition of congruent angles? Biblatex: submitting to a journal Suppose that I moved from BibTeX to biblatex. With BibTeX I just copied the content of .bbl file into final version of my paper before submitting it to a journal. What should I do at same stage having .bbl file produced by biblatex? It is of quite different format. The Windows Domain I manage has hundreds of computer names which I don't recognise and I'd like to remove old ones which aren't in use before trying to track down the misnamed ones.  Is there someway to see when the last time a machine logged onto the network? Either via dhcpd or a user login event or something else. In various articles it is mentioned that for secure communications, the recommended key sizes are 128-bit key size for symmetric encryption (which makes it $2^{128}$ possible keys?) and 2048-bit key size for asymmetric encryption ($2^{2048}$ possible keys?).  Why do they differ so greatly? It seems like I am missing a very big part of the equation. I am on Ubuntu and I did this command:  $ uname -a Linux slabrams-desktop 2.6.32-29-generic #58-Ubuntu SMP Fri Feb 11 19:00:09 UTC 2011 i686 GNU/Linux   Does it mean I am on 32bit or 64 bit processor?  The reason I am trying to figure this out is that I was getting errors which looked like this:  cannot execute binary file   and from Googling, I thought it was a processor issue.  Any ideas? R code to solve for probability of normal distributions? I don't understand which R code I am supposed to be using to figure these problems out. I brief explanation of what the code is doing would be amazing. The problems below are two different applications I'm expected to understand and I don't get either. Thank you!  Problem 1. Let Z~N(0,1) For each of the following, find c such that the equation is true.   a) P(Z&lt;c) = 0.8413  b) P(0&lt;Z&lt;c) = 0.3051  c) P(-c&lt;Z&lt;c) = 0.8664   Problem 2. X~N(3,4) compute  a) P(X&gt;3)  b) P(1&lt;X&lt;8)  c) P(-1.5&lt;X&lt;1) The question is to calculate the radius of convergence of $\sum\limits_{n=0}^\infty n!x^{n^2}$.  I dont know how to calculate R.O.C for such type of questions involving $n^2$ as power of x. How do we do this? Any help appreciated.