I'm working on an implementation of PCA that works on very large data sets.  Based on my understanding of the algorithm, the first step is to do an  of the input m x n matrix, X. This SVD looks like X = WΣVT. The "interesting" output Y of this process -- , "The PCA transformation that preserves dimensionality (that is, gives the same number of principal components as original variables)" -- is given by the following equation:    Based on my reading, if I can compute the W component of the SVD, then I can compute Y as:    The upshot here is that I'd only have to compute W. In terms of computational and memory complexity, this approach is significantly more efficient because the only matrix above and beyond the initial data set I'd have to load has size m x m, which (at least in my case) is much smaller than V, which would be n x n.  Is there some reason why this derivation won't work that I'm not seeing?
Principal component analysis (PCA) is usually explained via an eigen-decomposition of the covariance matrix. However, it can also be performed via singular value decomposition (SVD) of the data matrix $\mathbf X$. How does it work? What is the connection between these two approaches? What is the relationship between SVD and PCA?  Or in other words, how to use SVD of the data matrix to perform dimensionality reduction?
prevent the deletion of account records if they have oppurtunity trigger preventAccountDeletionifopp on Account (before delete) {     for(account accdel:trigger.old){        Opportunity oppprevent =[select Name,(select Name,Owner from Opportunitys)from ACCOUNT =: accdel.id ];         if(oppprevent.size() &gt; 0){           accdel.adderror('Opportunity record is refering this record.So, you cannot delete it...!');         }    } } How to prove the existence of $b$ in $Q$ such that $a<b^2<c$ in $Q$? How to edit / how to format box overlapping with footer when scrolling down Google Chrome doesn't seem to respect my DPI setting in Windows. I run at 150 DPI, but Chrome ignores that, meaning that images and text are teeeeeeny tiny.  I hit:   Ctrl + + Ctrl + +   to zoom in. Unfortunately every new tab, or new window, defaults to the 100% teeny tiny zoom level.  Update: It's also important to note that you cannot click buttons in flash (e.g. YouTube videos), because Chrome mis-handles mouse coordinates. (Fixed 6.0.472.55)  Is it possible for either:   Chrome to respect my Windows dpi setting? Chrome to remember my zoom preference?   Checked version: 4.1.249.1045    Half fixed    While Chome still doesn't honor the Windows DPI setting, it does now remember your zoom level.  Version: 5.0.375.55    Five-Eighths Fixed    While Chrome still doesn't honor the Windows DPI setting, it does now offer a default "page zoom" option:    Unfortunately there is no zoom level that matches my current DPI setting: 136% (131dpi).  Version: 10.0.648.133  Zoom flag  I tried scoducks' suggestion of the new hidden dpi flag. It's truly awful. It seems to cause Chrome to simply re-scale the final rendered Window; causing text to become blurry (rather than sharper): How to make an ImageView with rounded corners? Erf as term for plot of land in a town or city. Is this word only used in southern Africa? The Free Dictionary website states and so does Wikipedia:     erf [ɜːf]   n pl erven [ˈɜːvən]   (Engineering / Civil Engineering) South African a plot of land, usually urban, marked off for building purposes   [Afrikaans]   The term erf is used in legal documentation and technical English throughout South Africa and Namibia, maybe even further afield in the region.  Is it used anywhere else, except maybe the Dutch/Flemish regions in Europe, where I assume the term originated?  An example:      The client purchased Erf 132, Windhoek for a large sum of money. He intends to build a house on this erf.   The capitalisation of "Erf 132" is commonplace, since it is a definition of a location. This is similar to capitalisation of towns or cities. I find it slightly awkward, but that is how it is done. Heathrow change in terminal flight UK Border control check? I am traveling from NYC to Mumbai via London. Assume my connecting flight belongs to different terminal. If I have to change terminal at Heathrow, do I need to go through UK Border control ? 32-bit, 64-bit CPU op-mode on Linux Print composer custom grid label problem In answer to  Klas Karlsson puts forward a solution to the problem of formatting print composer grid labels for projected maps.  I'm very weak on scripting, but in QGIS 2.14 I've tried to enter the text as shown in Klas's illustration, which generates error messages. In my case I'm working with a coordinate system that has a six-digit Easting and a six-digit Northing and I'm trying to get a result similar to that shown in Klas's picture (but with a six-digit Northing). Can anyone help me with this? Solve $$u_{xx}-3u_{xt}-4u_{tt}=0$$ where $u(x,0)=x^2$ and $u_t(x,0)=e^x$.  My workings so far: I have factored the differential equation in the following way: $$(\delta_x-4\delta_t)(\delta_x+\delta_t)=0$$ where $\delta_x=\frac{\delta}{\delta x}$ etc. Now if we let $v$ be the solution to $(\delta_x+\delta_t)u$ then we have the following two equations: \begin{eqnarray*} (\delta_x+\delta_t)u=u_x+u_t=v\\ (\delta_x-4\delta_t)v=v_x-4v_t=0 \end{eqnarray*} Now for $v$ we simply find $$v=h(t+4x)$$ where $h$ is an arbitrary function of one variable. Now what remains is find $u$ such that $$u_x+u_t=h(t+4x)$$ I am stuck here, I thought about making a change of variables $\zeta=x+t$ and $\eta=x-t$ and thus using the product rule to show that $u_x=u_{\zeta}+u_{\eta}$ and $u_t=u_{\zeta}-u_{\eta}$ and thus $u_x+u_t=2u_{\zeta}$ and we need to solve $$u_{\zeta}=h(t+4x)$$ (I left out the factor 2 because $h$ is an arbitrary function). Do I simply integrate now and conclude $$u=f(\zeta)h(t+4x)+g(\eta)=f(x+t)h(t+4x)+g(x-t)$$ This seems wrong to me...  Some help would be greatly appreciated! Can someone explain __all__ in Python? I have been using Python more and more, and I keep seeing the variable __all__ set in different __init__.py files.  Can someone explain what this does? Is Python/ArcPy capable of delimiting strings with commas into different fields, and running a calculation based on those separate columns Using ArcGIS ArcMap 10.6: I have a text field in an attribute table that has comma separated values (example: 12,24, 64, 87,29). For this example, I will name this field VALUES. Please note that VALUES includes data collected from field work so the spacing between commas will be varied. My current workflow is as followed:  Export the ID and VALUES fields in the attribute table into a .csv file using Table to Table in ArcMap 10.6 Open the .csv in Excel and run the 'text to columns' function under the Data ribbon Separate the VALUES field into multiple columns based on commas Run the calculation: Copy Column I values and ID columns into a new .csv file Save and close the new .csv file and join the shapefile to the new .csv file based on ID Export the newly joined shapefile into a new file and delete the duplicate ID field in the new shapefile  I am wondering if there is a way to automate this Python/ArcPy so I can create a custom script tool to do this without leaving the ArcGIS environment. Is there a way to separate values in a text field based on commas into different columns, run the above calculation, and have the values from that calculation entered in a new field named VALUES_CALCULATED? I'd like to manage my home machines and laptops with Landscape, how can I do this? Changing timezone in PHP Alright, quick question.  A server is running in Eastern Time. PHP program needs to make date calculations using Central time.  At the moment, I am putting this line at the very top of my script:  putenv("TZ=US/Central");   Is that the best way to go about that or is there some PHP trick I'm not aware of?  Cheers. Always when I'm going to travel to someplace, I book my hostel with precedence. Actually I look only for two Booking sites:      Is there a cheaper site than these two, which has the same service with same quality, with the same number or larger? While reviewing "First Posts" on Stack Overflow, I often come across new users posting comments as answers. It seems (at least to me) they are not doing this because they are unaware of how Stack Overflow works but because they can't comment on any question they are forced to put it as answer.  I have found duplicate questions for my request like:   ,  and    but the best explanation I have found is an  to .     I think the main reason this isn't supported is there's no way to   downvote comments, which would make them attractive to spammers. If   somebody comments on the top answer in a question the only way to get   rid of it is for six people to flag it. Comment flags don't show up on   10k tools, so it needs to be six people that happen to stumble across   the spam comment, or a moderator that checks the list manually. People   can comment every 15 seconds, so that can get out of hand pretty   quickly. Comments also aren't listed on the user's profile page, so   it's hard to see at a glance if a user has been spamming   So I am suggesting allowing new users (with less than 50 reputation points) to comment only 5 times every day or only 25 times times until they reach 50 reputation points or any other variation of it. Character Limit in HTML How do you impose a character limit on a text input in HTML? URL regex passed by regex buddy but failed by Dart How to create a soft or symbolic link? Accepted answer appearing below top voted