The centroid of a cluster is defined as centroid. It is defined as the mean of each dimension across all samples of the cluster.  What is the analogous that uses the median of each dimension? As far as I know, a similar concept is the medoid, which needs to be an actual sample of the cluster.
The representative point of a cluster or cluster center for the k-means algorithm is the component-wise mean of the points in its cluster. The mean is chosen because it helps to minimize the within cluster variances (which is to say that it is minimizing within cluster squared Euclidean distance, since its the same). Now, when I want to use a different distance metric, like L1 (Manhattan distance), I would be minimizing the within cluster absolute deviations (if I choose to). I was looking at what the centers calculation would be like, because the mean won't reduce the new objective function, and I found this on the Matlab documentation of their kmeans function for the distance parameter     cityblock - Sum of absolute differences, i.e., the L1 distance. Each centroid is the component-wise median of the points in that cluster.   Now, how did they come up with the component-wise median? How does a median minimize absolute deviations?
Prove linear combinations of logarithms of primes over $\mathbb{Q}$ is independent Suppose we have a set of primes $p_1,\dots,p_t$. Prove that  $\log p_1,\dots,\log p_t$ is linear independent over $\mathbb{Q}$. Now, this implies $ \sum_{j=1}^{t}x_j\log(p_j)=0 \iff x_1=\dots=x_t=0$.  I think I have to use that fact that every $q\in\mathbb{Q}$ can be written as $\prod_{\mathcal{P}}$, where $n_p$ is a unique sequence ($n_2$,$n_3$,$\dots$) with domain $\mathbb{Z}$. Here, $\mathcal{P}$ denotes the set of all integers.  Now how can I use this to prove the linear independency? Impact of deleting 100GB table on Mirroring I'm about to delete a large table which is approximately 100GB in size.  I'd like to understand the impact on the mirroring that's in place on this db.  Can anyone confirm? Check if partition is encrypted How would I prove there is no smallest positive rational number? what is the best method to prove this statement? how to make winforms webbrowser control to work very similar to targeted Internet explorer Windows update doesn't progress beyond 0 KB 0% Converting Degree Minutes to decimal degrees using Excel formula? I have location points collected from a garmin device stored in an excel sheet in Degree Minutes format --- W00208.172,N1046.977.  I am looking for an Excel formula to convert either to Decimal Degrees or Degrees Minutes seconds Format ? How to get the current date/time in Java Adding a CTAN package to a MacPorts-maintained TeX installation I have installed TeXlive through MacPorts and now discover that I am missing some package. For clarity let's use a trivial example and say I am missing lipsum.sty.  I now have two options:  Option 1  I go to a CTAN site, look for lipsum.sty, download it, and install it in ~/Library/texmf/tex.  This is not bad, but it leaves it possible that I will end up with a second lipsum at some point. That's why the second option is desirable.  Option 2  2.1-- I find out which MacPorts package includes lipsum.sty  and  2.2-- I sudo port install the necessary package.  How do I do 2.1? I masked an image in the UV/Image editor masking section. I then used that mask in the compositor for background replacement. However, the mask size seems to be different. Why is that? Here's a screenshot: I've got about a billion rows of data in a table with a name and an integer in the range 1-288.  For a given name, every int is unique, and not every possible integer in the range is present--so there are gaps.  This query generates an example case:  --what I have: SELECT * FROM ( VALUES ('foo', 2),               ('foo', 3),               ('foo', 4),               ('foo', 10),               ('foo', 11),               ('foo', 13),               ('bar', 1),               ('bar', 2),               ('bar', 3)      ) AS baz ("name", "int")   I'd like to generate a lookup table with a row for each name and sequence of contiguous integers.  Each such row would contain:  name   --  the value of the name column start  --  the first integer in the contiguous sequence end    --  the final value in the contiguous sequence span   --  end - start + 1  This query generates example output for the above example:  --what I need: SELECT *  FROM ( VALUES ('foo', 2, 4, 3),               ('foo', 10, 11, 2),               ('foo', 13, 13, 1),               ('bar', 1, 3, 3)      ) AS contiguous_ranges ("name", "start", "end", span)   Because I have so many rows, more efficient is better.  That said, I only have to run this query once, so it isn't an absolute requirement.  Thanks in advance!  Edit:  I should add that PL/pgSQL solutions are welcome (please explain any Fancy Tricks--I'm still new to PL/pgSQL). How can I list installed packages by installation date?  I need to do this on debian/ubuntu. Answers for other distributions would be nice as well.  I installed a lot of stuff to compile a certain piece of code, and I want to get a list of the packages that I had to install. Which registry keys are impacted with Xerox Printer driver installation? I am implementing a driver deployment with Samba.  Every possible model of printer found an easy solution, except for Xerox Workcenter.    After browsing the Internet, I found that Xerox printer driver has to change some registry keys in order to work, keys which are changed by the executable downloadable on the manufacturer website.  Do you know which key are impacted by the Xerox Workcenter GPD driver?  This corresponds to the error message I get while uploading to Samba, which asks the position of a file named as a registry key.  I browse Samba bug tracker and they did not specify which registry key are impacted.  I contacted Xerox itself, but despite that fact that we have a support contract and really a huge number of workstations, it seems that Xerox is not willing to help us. \dots versus \ldots - is there a difference? Is there a difference between \dots and \ldots, the ellipsis?  If yes: Which? When to use \dots and when to use \ldots?  If no: Why are there both at all? I accidentally closed the window for the verfication code I wanted to create an account for Ubuntu One, but I got impatient when the email with the verification code didn't arrive... I thought I might have typed the wrong address, closed the window and tried again. it told me the address already existed and I just got the code. But since I closed the window I missed it. Is there any way to recover the code? I'm trying to move some data over and to start with I'd like to make sure that the size is ok. I run into a problem however, if I check the folder with   du -sh  myfolder/ 780M    myfolder/   but   du -sh * .. 71M     myfolder ..   I thought it might be something to do with hidden files but this particular folder does not have any inside.  Am I missing something? Magnitude of standardized coefficients (beta) in multiple linear regression Being aware of , I am curious about the question how big standardized coefficients can get. I had a discussion with my professor about that issue and she was arguing standardized coefficients (beta) in multiple linear regressions can not become greater than |1|. I have also heard that predictors with standardized coefficients greater than 1 should not be be included/appear in multiple linear regression. When I recently estimated a multiple linear regression in R using lm(), I estimated the standardized coefficients with lm.beta() function from the package 'lm.beta'. In the results I could observe a standardized coefficient greater than one. Right now I am just not sure about what is the truth.  Can standardized coefficients become greater than |1|? If yes, what does that mean and should they be excluded from the model? If yes, why?  I would be very thankful, if somebody could make this issue clear for me. Dynamic single-line printing in Python (time?) Allow me to get notifications for new Meta posts, like mods do I'm currently helping out on . One of the most valuable things on new beta sites, especially private/early public betas, is Meta participation - see :  Treat Meta Questions Like Gold It’s not unusual for your meta site to receive significantly less traffic than the main site. The problems begin when you meta starts to get ignored by the community and ignored by the moderators. It is particularly disturbing when users reach out in meta and starts talking about improving the site or asking for help… only to be ignored; No follow-up, only deafening silence  Because of this, Diamond mods get a notification in their inbox for each new question on their Meta, helping ensure that each meta post is addressed. However, wouldn't it be great if Diamond mods weren't the only ones that could do this? The post does say that the community needs to be seeing these questions too. As an involved user, I would really like to be notified of these new questions - it would increase the good I could do the site. How about this?:  Of course, it would be opt-in, not opt-out, and per-site. A feature like this would greatly improve the good that enthusiastic site-builders can do for the site, and would, most likely, increase the overall chances of a site's success. Can I look at the upgrade log after a distribution upgrade? I've upgraded to Ubuntu 12.04 and did it . I didn't look at the "packages to remove" section before clicking next - I've done Ubuntu upgrades many times and assumed it was just the normal set of obsolete library packages etc. But I do tend to watch the terminal text go by and see what it's doing, and I saw it removing a number of packages I wanted. I guess these are packages that aren't on the CD that can't co-exist with the new Ubuntu.  Anyway, I want to find which packages have been removed. So does the update log get saved somewhere?  Then I can start doing some grepping on it and then reinstall the packages I did want.