I would like to understand, how a clustering algorithm can be used (if possible) to identify naturally occurring groups within a data set, prior to building predictive models/model, and to hence improve accuracy of models/model
In clustering the outcome variable or the response is unknown, this is why it's called clustering. Irrespective, of the fact the data being labeled or unlabelled, clustering can be applied as a data preprocessing algorithm. Essentially, you must proceed by employing the initial data preprocessing tasks (like missing value treatment, collinearity, skewness etc). Once, the data is "statistically clean", then you can apply any clustering technique. However, remember clustering requires data to be "grouped" such that data points within a group are related to each other and unrelated to other data points belonging to another group. This can be achieved only if you have a "statistically clean" data. The next important point to consider is, "how to determine the possible number of clusters". Because any clustering algorithm will divide the data points into groups oblivious of the fact whether the groups exist or not. Therefore, you will have to prove mathematically/statistically the occurrence of groups in the dataset. In literature, there exist several methods like the "Principal Component Analysis (PCA)" or the "elbow method". Once, you have determined such groups, you can then label the groups and perform predictive analytics.
Clustering is primarily useful for you to understand your data.
It probably does not help much to automate that and try to use it for prediction. You can try, but I don't think it will even improve results much to use cluster information.
There are two things that you need to consider:
- Clustering is very difficult, expensive, and hard to parameterize. That means it won't be easy to automate in a useful way - it breaks all the time when data changes.
- Most good clustering (not kmeans) cannot predict the cluster label on new data. So using it will mean you first need to train a classifier to predict the cluster, then use this in another classifier to predict your class.