The support vector machine, which is a novel algorithm from the machine learning community, was used to develop quantitative structure activity relationship models to predict the antiviral activity of 4-alkylamino-6-(2-hydroxyethyl)-2-methylthiopyrimidines. The genetic algorithm was employed to select the variables that resulted in the best-fitted models. A comparison between the obtained results using support vector machine with those of multiple linear regression revealed that support vector machine model was much better than multiple linear regression. The root mean square errors of the training set and the test set for support vector machine model were calculated to be 0.102 and 0.205, and the correlation coefficients (r2) were 0.956 and 0.852, respectively. Furthermore, the obtained statistical parameter of leave-one-out (LOO) and leave-group-out (LGO) cross-validation test on support vector machine model were 0.893 and 0.881, respectively, which prove the reliability of this model. The results suggest that branching, volume and lipophilicity are the main independent factors contributing to the antiviral activities of the studied compounds.