$β$-Thalassemia is a blood disease caused by a mutation in the second intron of the $β$-globin gene of hemoglobin that leads to abnormal hemoglobin production. Low molecular weight compounds have been proposed to modulate defective splicing by binding unwanted splicing sites, thereby restoring correct splicing. This study investigates the origin of this splice switching activity in a set of 39 active and 61,000 inactive compounds. The $K$-means algorithm was applied to the inactive compound points with 39 clusters, in which a point from each cluster was selected to create a balanced data set of 39 active and inactive compounds. To avoid random bias, predictive models (i.e., decision tree (DT), random forest (RF), artificial neural network (ANN), partial least squares discriminant analysis (PLS-DA) and support vector machine (SVM)) were constructed 50 times. The performances of the predictive models were statistically assessed in terms of accuracy, sensitivity, specificity and Matthews correlation coefficient (MCC). RF provided an accuracy of 89.50 ± 13.45, sensitivity of 94.97 ± 13.49, specificity of 84.29 ± 22.27, and MCC of 0.80 ± 0.25 for 10-fold CV, and it provided and accuracy of 88.00 ± 8.55, sensitivity of 87.89 ± 13.93, specificity of 87.51 ± 13.75, and MCC of 0.75 ± 0.18 for external testing. Taking advantage of the built-in feature selector of RF, a thorough analysis of feature importance was conducted. Newly identified fingerprint substructures, namely, three carbon-hetero bonds (i.e., secondary amide, tertiary amide, carboxyl derivative, carboxylic acid derivative and nitrile), carbon-carbon bonds (i.e., primary carbon, secondary carbon and alkene), aromatics (hetero N nonbasic) and carbon-hetero bond (alkyl aryl ether), may provide a better understanding of the structural variations governing the splice switching activity of the hemoglobin $β$-globin gene.