A general framework for estimation and inference from prototypes of feature clusters