K-means: Does it make sense to remove the outliers after clustering the datasets? The requirements of the project is to cluster the dataset (using k-means) and then remove the outliers (using MAD) from each of the cluster.
However, I don't feel that it make sense to do that. I think outliers should be removed from the dataset first and then do the clustering.
I'm really new to k-means and machine learning in general. I would really appreciate suggestions. Thanks in advance!
EDIT1: Answering @Tim as to why outliers should be removed:
There are actually 2 process. 


*

*running the k-means, 

*removing the outliers from each cluster
 A: K-means can be quite sensitive to outliers.
So if you think you need to remove them, I would rather remove them first, or use an algorithm that is more robust to noise. For example k medians is more robust and very similar to k-means, or you use DBSCAN.
Consider, for example, this one dimensional dataset: 1 2 3 4 101 102 103 104 10000.
A: I would assume there are two approaches to your task:


*

*Remove outlier first and then apply your clustering algorithm (for this step itself you may use clustering algorithms!). Please note that k-means itself is not a Soft Clustering algorithm so it does not model the overlaps. For that you may use algorithms like Fuzzy C-Means. There you can define an overlap by clusters for which the memberships of a sample are closer than a threshold.

*Ignore the outlier removal and just use more robust variations of K-means, e.g. K-medoids or K-Medians, to reduce the effect of outliers.
The last but not the least is to care about the dimensionality of the data. K-Means is not a proper algorithm for high dimensional setting and needs a dimensionality reduction step beforehand.
A: One method for outlier detection is clustering data, and then try to find outliers using median of cluster distances and also number of points in each cluster and like these kinds of methods and measures. Hence, using clustering methods to find outliers is not strange that much and can be a solution to find outliers in some situations.
A: K-means is an unsupervised algorithm used to find structure in data.  Take a simple example: we have the heights and weights of people.
If we run this algorithm as "2- means," the algorithm might find the categories "male" and "female."

But it might not make sense to throw away outliers unless that's really sensible in the problem; just because there is a person who's really fat and really short doesn't mean they're not a person.  However, if there's noise in your dataset, that noise should really be thrown away; you only want signal
Please clarify the situation with more details of what the project is.
