I was wondering about the possibilities of clustering numerical data (more than 3 dimensions) into different clusters and doing curve fitting on each cluster to get much higher accuracy than using a single model.
Since linear regression is preferred, is there any way to cluster the data points based on their linear fitting?
This is because I need a result matching the input data and do not care about unseen data. I cannot hard code the data and use a lookup mechanism. Instead an approximate math function would be preferable.
Is there an existing implementation ? (Preferably in Python)