As technology nodes continues shrinking, lithography hotspot detection has become a challenging task in the design flow. In this work we present a hybrid technique using pattern matching and machine learning engines for hotspot detection. In the training phase, we propose sampling techniques to correct for the hotspot/non-hotspot imbalance to improve the accuracy of the trained Support Vector Machine (SVM) system. In the detection phase, we have combined topological clustering and a novel pattern encoding technique based on pattern regularity to enhance the predictability of the system. Using the ICCAD 2012 benchmark data, our approach shows an accuracy of 88% in detecting hotspots with hit-to-extra ratio of 0.12 which are better results compared to other published techniques using the same benchmark data.