I am currently trying to use classification analysis for some EEG data. As such data is of very high dimensionality, I am looking at using PCA for dimensionality reduction to prevent overfitting of the classification models.  My data structure is approximately 50 (rows, observations) times 38000 (columns, variables). I used the Matlab ‘pca’ function to generate principal components from my variables. I have three questions about this.   First, as stated on the Mathworks website (), rows of the input matrix X should correspond to observations and columns to variables, which is the case for my approach. However, the number of principal components is always equal to rows/observations-1 (I tried using different numbers of rows). Why is this the case? Should it be this way? To me, it would be more intuitive if the number of (maximal) components would be equal to columns/variables-1. Also, I observed that the sum of the output variable ‘explained’ is always 100, whether I have 5 or 50 principal components. Am I right to assume that this variable therefore does not refer to the proportion of the original data’s variance explained by the principal components but rather reflects the spread of ‘principal component’ variance across individual components? How can I find out the former? That is, how much of my data’s variance is included in the resulting principal components? Or do principal components always reflect the whole variance, no matter how few they might be? Finally, I understand the ‘scores’ variable so that it reflects my data’s variance, meaning that it can be used analogously to my original data’s variables (e.g. columns). Is this right? Or do I have to project my data back to the original axes after performing PCA and using only a subset of the components? If so, how do I then even reduce input dimensions? I tried ‘reversing’ PCA and I received the same number of variables as before, just with different values in the matrix.
In PCA, when the number of dimensions $d$ is greater than (or even equal to) the number of samples $N$, why is it that you will have at most $N-1$ non-zero eigenvectors? In other words, the rank of the covariance matrix amongst the $d\ge N$ dimensions is $N-1$.  Example: Your samples are vectorized images, which are of dimension $d = 640\times480 = 307\,200$, but you only have $N=10$ images.
Find the remainder when $45!$ is divided by $47$? Find the remainder when $45!$ is divided by $47$?  My approach I am using Wilson's theorem to solve the problem. I reduced the expression into ($47$-$1$-$1$)!/$47!$=$(47$-$1$)/$47$!-$1$/$47!$=-$1$-$1$=-$2$  Am I right in my approach.Please correct me if I am wrong? Please correct me how to approach towards the problem. How can I randomise the output of a redstone circuit? I have 5 buttons and only one of these can be correct, all others must be false. These 5 outputs will go into 2 outputs, in between there needs to be a circuit which changes which single button out of the 5 will go down the &quot;correct&quot; output of the final 2. The 4 remaining buttons must go to the second of the final 2 outputs. Both final outputs must give out a true signal for a brief period the same as a button on its own would produce. There should also be a way of activating the circuit. Not sure if that is explained well enough so I have made a basic diagram of what I need.  The diagram shows how I need the signal to be split. However in between the buttons and the final two wires there needs to be a circuit (marked by the grey box). This circuit changes the single button connected to the left wire. The right input should start the circuit and randomise the 5 buttons. There are no limits to size, amount of materials used or method used. This question is similar to the one asking about , but I am specifically working with Redstone circuitry - the commands solutions do not apply here How do I hide a process in Task Manager in C#? I have a requirement to hide a process in Task Manager. It is for Intranet scenario. So, everything is legitimate. :)   Please feel free to share any code you have (preferably in C#) or any other techniques or any issues in going with this route.  Update1: Most of the users have admin privileges in order to run some legacy apps. So, one of the suggestion was to hide it in task manager. If there are other approaches to prevent users from killing the process, that would be great.  Update2: Removing the reference to rootkit. Somehow made this post look negative. What is the name for moments, a parameter that is calculated Filter the score of the questions on the homepage before loading them At the moment questions on the homepage are loaded by the top N most recent and then ones with a score of -4 or less are filtered out. This doesn't make much difference for a user who is logged in but consider anonymous users; their home page is only 15 questions in length. If someone was to edit several posts that bump to the top with a score of -4 or less then the home page looks tiny. At the moment on SFF, for example, the homepage for anonymous users only shows 9 questions:  At one point it only showed 3 questions (a few weeks back):  Can the filtering logic be changed to before the questions are loaded to appear on the homepage? If $2a_{n+2} \le a_{n+1}+a_n$, then $\lim \sup a_n \le \frac23 a_2 + \frac13 a_1$ This is a reformulation of a deleted question:  If  $a_1 &gt; 0$ and $a_2 &gt; 0$ and $2a_{n+2} \le a_{n+1}+a_n$,  show that  $\lim \sup a_n \le \frac23 a_2 + \frac13 a_1$.  My proof involves showing that $a_{n+2} \le u_{n} a_{n+1} + (1-u_n)a_n $ where $u_n \to \frac23$, and I wondered if there is a simpler proof.  I will post my proof in a couple of days if no one does. Environment variables when run with 'sudo' Failed to upload an image, "An error occurred at imgur" Currently I'm unable to upload an image to anywhere on site: e.g. posts or chat.                Is this problem with Imgur? The choice field adds a blank option in all my sharepoint lists. How do I remove this? the column settings does not have a blank option. Discourage questions being marked as answered within an hour or so of being posted Can we get rid of the threshold of 15 chars for comments? I understand that there is an upper limit. But why do you have to type at least 15 characters to post a comment? It is easy to work around it anyway (like adding dots or other useless things). Word for sentences that make sense when read backwards? Is there a word for sentences that make sense when read normally or backwards (not necessarily by reversing the words)? Example:     "Are you as bored as I am?" That's a lot of ___ vs. those are a lot of ___ That's a lot of cars!   Those are a lot of cars!      The context is when a someone sees many objects (in this example, cars) and makes the exclamation.   According to , lot can handle either singular or plural verbs.  I agree with the author who states that that's sounds better, but the post doesn't seem definitive either way.     Are both grammatically correct and do they have the same meaning? "invalid use of incomplete type" error with partial template specialization The following code:  template &lt;typename S, typename T&gt; struct foo {    void bar(); };  template &lt;typename T&gt; void foo &lt;int, T&gt;::bar() { }   gives me the error  invalid use of incomplete type 'struct foo&lt;int, T&gt;' declaration of 'struct foo&lt;int, T&gt;'   (I'm using gcc.) Is my syntax for partial specialization wrong? Note that if I remove the second argument:  template &lt;typename S&gt; struct foo {    void bar(); };  template &lt;&gt; void foo &lt;int&gt;::bar() { }   then it compiles correctly. This is an example from Munkres's Topology (Example 4 in Section 22 titled &quot;The Quotient Topology&quot;, 2nd edition).  Example 4: Let $X$ be the closed unit ball $$\{ x \times y \mid x^2 + y^2 \le 1\}$$ in $\mathbb{R}^2$, and let $X^{\ast}$ be the partition of $X$ consisting of all the one-point sets $\{ x \times y \}$ for which $x^2 + y^2 &lt; 1$, along with the set $S^1= \{ x \times y \mid x^2 + y^2 = 1 \}$. Typical saturated open sets in $X$ are pictured by the shaded regions in the figure below. One can show that $X^{\ast}$ is homeomorphic with the subspace of $\mathbb{R}^3$ called the unit 2-sphere, defined by $$S^2 = \{ x \times y \times z \mid x^2 + y^2 + z^2 =1 \}.$$  I am confused about two points in the example.  Problem 1: About the saturated open sets in $X$. In the example, the typical ones are pictured by the shaded regions ($U, V$) in the figure. However, I am not sure whether the boundaries (visually, by picture) of $U$ and $V$ are included. Particularly, there are two boundaries for $U$. Are they both contained in $U$? And why? Problem 2: How to show that $X^{\ast}$ is homeomorphic with $S^2$? What is the mapping between them?  The following is my understanding:  Solution to problem 1: For $V$, the boundary is not included. For $U$, the outer boundary is included, while the inner one not. Is this solution right? How can I do a Cache Refresh in Google Chrome? I don't know what exactly it's called, by cache refresh I mean, refresh the page after clearing its cache. I don't want to clear the entire browser cache.  I can't seem to cache refresh my pages. In Firefox, I know it to be Shift+Refresh.  In Chrome, I've tried Ctrl+R, Ctrl+Refresh, Alt+Refresh, Shift+Refresh but none of them work. Let $G$ be a non-empty finite set with an associative binary operation so that cancellation law holds, i.e. $ab=ac$ or $ba=ca$ implies $b=c$, for any choices of $a,b,c$ in $G$. Assume that there is an identity element $e$ in $G$. Show that $G$ is a group.  Proof: To show $G$ is a group, conditions must hold. Suppose that $ab=ac$, then $b=eb=(a^{-1}a)b =a^{-1}(ab)=a^{-1}(ac) =(a^{-1}a)c=ec=c$. So left cancellation holds in $G$.  2) Suppose $ba=ca$, then $b=be=b(aa^{-1}) =(ba)a^{-1}=(ca)a^{-1} =c(aa^{-1})=ce=c$. So right cancellation holds in $G$.  3) If $a$ exists in $G$ then $aa^{-1}=a^{-1}a=e$, where $a$ is an inverse of $a^{-1}$. Since inverses are unique, $(a^{-1})^{-1}=a$.  4) Let $x$ be the inverse of $ab$. Then $(ab)x=e$. By associativity we have $a(bx)=aa^{-1}$. Through left cancellation we have  $bx=a^{-1}bx=ea^{-1}=b(b^{-1}a^{-1})$ and $x=b^{-1}a^{-1}$.  Thus $(ab)^{-1}=b^{-1}a^{-1}$. So all conditions hold, $G$ is a group.  Is this proof correct? I know to show $G$ is a group these conditions have to be met. This is all I have to show right? What's the action of banging two beers together called? How is an empty set truly "empty"? In a  question, an answerer says:  an empty bag is a bag with nothing inside it.  Makes sense, but I'm reading a textbook right now that says:  The empty set has only one subset (namely, itself).  Which seems odd to me. If a set is empty, why would it contain a subset? Regardless of whether or not the subset is also an empty set, the &quot;empty set&quot; still contains a subset, so how is it really &quot;empty&quot;? To go back to the empty bag analogy, it just sounds like my text book is saying:  an empty bag is a bag with nothing but an empty bag inside it.  Which doesn't make sense because then the bag isn't empty. I can't wrap my head around this concept. How to choose a good research problem? I am working to get a PhD, maybe next year this time around. Currently, this is my second year. I have published 3 papers. All of them are not about one problem but consider different problems. My strategy to find a research idea/problem is given below.  1 - Read papers whose titles are either interesting or I have some apriori understanding of those titles.  2 - Understand those papers as best as I can. That is, I try to understand each detail presented in the paper except the simulation results (this is because I think simulation results are hard to reproduce).  3 - I analyze the paper and try to find a very small problem which can be addressed (i.e. I can solve it) by the methodology of the paper.  4 - If I am successful at step 3 I start working on that problem otherwise I repeat the process from step 1.  By applying this strategy I have been able to write 3 papers and I have submitted a fourth (I am not satisfied with those papers because at very best they can be considered average papers). But my concern is that the problems addressed in those papers do not belong to one area. As far as I have seen, for the profiles of some of the renowned researchers in my field their PhD work is focused on one area. One main thing I console myself with is that almost all of those researchers had good supervisors. My supervisor does not even read the draft/reviews of my papers and the suggestions that he provides during the meetings are so broad that the problem becomes intractable. Under these circumstances what are your opinions: Is there any better strategy to do research?   I will be very thankful to you for providing me suggestions or commenting on my dilemma.