In this work we propose a hybrid learning machine, combining artificial neural networks (ANNs) and binary decision trees, to predict quantitative structure activity relationships (QSARs). This approach directly uses the structural cues from chemical compounds and has been validated for the two significant prediction problems, viz. regression and classification. For regression analysis we show the utility of the algorithm in predicting anti-HIV-1 activity of a class of 80 chemical compounds (called HEPT derivatives) found to be potential HIV-1 inhibitors. For classification the algorithm is used to predict hepatocarcinogenicity of 55 chemicals from the Carcinogenic Potency Database (CPDB). Hence, the proposed algorithm has the potential to be used in a generic form for a wider variety of similar problems. Each compound in both the datasets was cycled between the training, validation and test sets. The hybrid machine was tested on data which were not in the training set. The results were compared with the popular ANN based classifier proposed in literature (without using the hybrid approach) and the hybrid machine was found to perform better for both the prediction problems.